Im my app, I'm running a background service that runs regardless that app is running or not Please don't. This is why users attack us with task killers and the Force Stop from the Manage Services screen in Settings My main issue is on how to set the AlarmManager to call thisReceiver everytime it's set. Any idea?
You are not registering the BroadcastReceiver so AlarmManager will not be able to contact it Please please please please please please please redesign your service such that it does not have to run all of the time. Android will be killing off your service due to old age, anyway, so if you want a reliable and stable app, you need to do this redesign, anyway.
Im my app, I'm running a background service that runs regardless that app is running or not. Please don't. This is why users attack us with task killers and the Force Stop from the Manage Services screen in URL1 main issue is on how to set the AlarmManager to call thisReceiver everytime it's set.
Any idea? You are not registering the BroadcastReceiver, so AlarmManager will not be able to contact it. Please please please please please please please redesign your service such that it does not have to run all of the time.
Android will be killing off your service due to old age, anyway, so if you want a reliable and stable app, you need to do this redesign, anyway.
Basically part of the app is that it will get user's location (probably every 30 mins, regardless if the user is currently running the app or not). If the user is currently in one of the location as specified in the Array and notification is enabled, users will be sent a notification (and no more notification can be send for the rest of the day). The next day, all notifications will be re-enabled (thus the need of AlarmManager).
– ImpStudent Aug 27 at 18:27 @ImpStudent: "(probably every 30 mins, regardless if the user is currently running the app or not)" -- use AlarmManager and my LocationPoller so you do not need to keep a service in memory all of the time -- github. Com/commonsguy/cwac-locpoll -- everything else you cite should be maintained in a database or other persistent store. – CommonsWare Aug 27 at 18:38 okay I did more reading and it seems like it is actually possible to do my intended plan without the use of a background service.
Thanks for your guide. – ImpStudent Aug 29 at 2:08 I've tried using LocationPoller but somehow, it never managed to get my location.Im currently using Emulator. I've followed your demos and guide correctly but it still cannot detect my location.
Any idea whats wrong? – ImpStudent Aug 29 at 4:32 You need to feed a location to the emulator via DDMS or telnet, while LocationPoller is looking for a fix (i.e. , has an active requestLocationUpdates().
Personally, I have only tried LocationPoller on hardware, so there might be some emulator-specific issue that I am not aware of. – CommonsWare Aug 29 at 5:59.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.