[android-developers] Re: How do I create a background loop method
Thanks for your answers, there are no Server connections required for my method. What I'm doing is to check my actual position and compare it to defined areas in the database. if I find a matching Area I want to start an Intent and notify the user. If I get it right, my method should be a Broadcast receiver which will be triggered by the AlarmManager, is this right? so I will push my futher resarches in the direction of alarmManager. If you got some examples I would appreciate if you send me a link. regards larry On 1 Sep., 02:47, JP joachim.pfeif...@gmail.com wrote: A partial wake lock will do the trick, except in that it places a burden on the battery beyond normal operation. Also heads-up that the System seems to like killing Services that snooze. On Aug 31, 4:19 pm, Laxs oum.la...@googlemail.com wrote: Hi, I got a problem, I want to call a method every X minutes, if my method got a result it ´should inform the user by vibrating or showing a alertbox. if the method doesn't get a result it should wait for X minutes and restart. What is important, this should also work when the phone turns to sleep. Which means I want to wake the phone from sleep to run my method. Actualy I can activate my method via a Button, and it is working like I want it to be except thebackgroundloopthing. I already searching for a solution here in the group or also on google but I think I don't got the right search terms to find a solution for my problme. I already read about the AlarmManager and broadcast receiver but I'm not sure if this is right for my problem. I hope you could help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How do I create a background loop method
On Wed, Sep 1, 2010 at 6:28 AM, Laxs oum.la...@googlemail.com wrote: Thanks for your answers, there are no Server connections required for my method. What I'm doing is to check my actual position and compare it to defined areas in the database. if I find a matching Area I want to start an Intent and notify the user. If I get it right, my method should be a Broadcast receiver which will be triggered by the AlarmManager, is this right? And if there is significant work to be done, the BroadcastReceiver should probably delegate to an IntentService, since onReceive() runs at foreground priority on the main application thread. so I will push my futher resarches in the direction of alarmManager. If you got some examples I would appreciate if you send me a link. http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices/Alarm/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I create a background loop method
If your result is something a server knows about, you could use the C2DM thing to wake up your app instead of polling every x minutes. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I create a background loop method
A partial wake lock will do the trick, except in that it places a burden on the battery beyond normal operation. Also heads-up that the System seems to like killing Services that snooze. On Aug 31, 4:19 pm, Laxs oum.la...@googlemail.com wrote: Hi, I got a problem, I want to call a method every X minutes, if my method got a result it ´should inform the user by vibrating or showing a alertbox. if the method doesn't get a result it should wait for X minutes and restart. What is important, this should also work when the phone turns to sleep. Which means I want to wake the phone from sleep to run my method. Actualy I can activate my method via a Button, and it is working like I want it to be except the background loop thing. I already searching for a solution here in the group or also on google but I think I don't got the right search terms to find a solution for my problme. I already read about the AlarmManager and broadcast receiver but I'm not sure if this is right for my problem. I hope you could help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en