@commonsware
let me start by saying thanks for all the help that you give this community, i swear the majority of issues that i google you were the accepted answer.
anyway, had a few questions after i started using the locationpoller
as noted in another post, once i start your polling service, i occasionally get this:
03-07 15:42:03.260: W/MessageQueue(14699): Handler (android.location.LocationManager$ListenerTransport$1) {419425f8} sending message to a Handler on a dead thread
is this a concern still? i couldn't tell if this was just something the locationmanager is screwing up of it was maybe the timeout handler
next is my main concern for creating this post:
i need to track users while their screen is off as part of a destination aware navigation-like application, and for some reason its not waking up after going underground for a while.
i get some weird test results when playing with no network too. for now i start the service like you suggest
Intent i=new Intent(this, LocationPoller.class);
i.putExtra(LocationPoller.EXTRA_INTENT, new Intent(this, LocationReceiver.class));
i.putExtra(LocationPoller.EXTRA_PROVIDER, LocationManager.NETWORK_PROVIDER);
everything seems to work as u documented, when testing with airplane mode turned on PollerThread#onPreExecute()
gets called every time, and then never makes it to the end, and 2 minutes later, my receiver finally gets notified when the onTimeout
Runnable
gets triggered.
then when i turn airplane mode off again, everything seems to go back to normal, with my receiver eventually catching up again.
My issue is that when i test in the real world, and take the subway home but leave the app and service running, once i reconnect above ground, i cant seem to find any trace in the logs that the service continues on, and my receiver, which uses another wakelock to turn the screen back on / send a notification when close to your destination, never gets triggered until i re-open my app
long story short - is this an issue with the library? an issue with how locationmanager works? have you any ideas on a better way to test this rather than just using airplane mode?
above ground, biking around, driving, etc, everything seems to work just fine, but once i introduce the subway and i lose all connections, shit stops working, and i just dont know enough about the finer points of locationmanager to understand why the service seems to stop
disclaimer this app isn't meant for people on the subway but im just not sure (havent had any way to test) if a user is out in the middle of nowhere and loses network connectivity i hope they dont lose tracking as well (since they can choose to just use network provider or gps depending on the settings)