[android-developers] Re: Android kills my Thread created by Service

2013-04-23 Thread Piren
that's not how you're supposed to do what you want... To achieve such things, use the AlarmManager. http://developer.android.com/reference/android/app/AlarmManager.html On Tuesday, April 23, 2013 2:22:57 PM UTC+3, Turim wrote: I am developing a simple GPS tracker. But i have a problem. When

Re: [android-developers] Re: Android kills my Thread created by Service

2013-04-23 Thread Kristopher Micinski
I had sort of assumed that this was the same as in the other thread... In which case using an AlarmManager would be inappropriate (though, perhaps I assumed incorrectly..!). AlarmManager has a coarse scheduling granularity (minutes, rather than seconds), and I've always felt an aversion for using

Re: [android-developers] Re: Android kills my Thread created by Service

2013-04-23 Thread Piren
Well, if the need is for something that will continue running even when the app isn't in the foreground/running, nothing will work except for the alarmmanager. On Tuesday, April 23, 2013 5:26:15 PM UTC+3, Kristopher Micinski wrote: I had sort of assumed that this was the same as in the other

Re: [android-developers] Re: Android kills my Thread created by Service

2013-04-23 Thread Kristopher Micinski
If you need something to be running on a fine grained interval ( once a few minutes), I think it should morally be in the foreground. Yes, forgrounded apps can be killed off eventually: hence the necessity of using an AlarmManager at times. That being said, in my mind the use of an AlarmManager