On Mon, Nov 24, 2014 at 9:17 AM, Tony Pitman <t...@shatalmic.com> wrote:

> The whole reason I am doing this is because originally I just put my gps
> stuff inside the app itself. I would start my app and then many hours later
> I would enter the geofence area I had set up and the app did not trigger
> what I wanted it to do. I would go to the app and it looked like it was
> starting all over.


A little late to this party, but ...

If you're after geo-fencing, see here:
http://developer.android.com/training/location/geofencing.html

If you want to do stuff in response to location changes while your app is
not active, use this:
http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28long,%20float,%20android.location.Criteria,%20android.app.PendingIntent%29

On Mon, Nov 24, 2014 at 2:29 PM, Tony Pitman <t...@shatalmic.com> wrote:

> They pass in a parameter to that HandlerThread called
> Process.THREAD_PRIORITY_BACKGROUND.
> Is this different than using the startForeground that now fixed my issue?
>

Yes, the thread priority is for the system to manage and schedule threads.
This relates to* time and frequency allocation* for threads to run.

startForeground is specifically to mark a Service object as being important
to a user's experience, such that the system will favor it when memory gets
tight. The system will kill other components (background services,
Activities no longer visible, etc) before killing a foreground service.
This relates to *memory allocation* for system resources.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to