ifaz / little-fluffy-location-library

Automatically exported from code.google.com/p/little-fluffy-location-library
0 stars 0 forks source link

Stack trace i received from a running app #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
java.lang.NullPointerException
at 
android.location.LocationManager._requestLocationUpdates(LocationManager.java:75
2)
at 
android.location.LocationManager.requestSingleUpdate(LocationManager.java:906)
at 
com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService.forceL
ocationUpdate(LocationBroadcastService.java:132)
at 
com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService$1.run(
LocationBroadcastService.java:87)
at java.lang.Thread.run(Thread.java:1050)

Original issue reported on code.google.com by martins....@gmail.com on 14 Feb 2013 at 5:51

GoogleCodeExporter commented 9 years ago
Sorry for the delay replying, only just noticed this. Have you seen this again 
since? It's inside the Android core LocationManager library which of course 
shouldn't happen.

Original comment by ken...@kentonprice.com on 1 May 2013 at 8:12

GoogleCodeExporter commented 9 years ago
it is happening on very rare occasions don't know possible rooted devices.

offtopic

have you received some reports that your lib is draining battery becouse of
gps is alive ? i had some htc jellybean device reports ...
i fixed that by adding fev lines that kill singleRequestUpdate in
LocationBroadcastService #134 after a while

locationManager.requestSingleUpdate(criteria, oneshotReceiver);

                if (LocationLibrary.showDebugOutput)
Log.d(LocationLibraryConstants.TAG, TAG + ": schedule timer to kill
locationlistener");

                new Timer().schedule(new TimerTask(){

                public void run(){

                try{

                if (LocationLibrary.showDebugOutput)
Log.d(LocationLibraryConstants.TAG, TAG + ": remove updates after minute");

                locationManager.removeUpdates(oneshotReceiver);

                }catch(Exception e){

                e.printStackTrace();

                }

                }

                }, 60000);

Original comment by martins....@gmail.com on 2 May 2013 at 6:58

GoogleCodeExporter commented 9 years ago
Android 4.2.1 never stops asking for a one-shot update. This looks like a good 
solution to it. I will include this in a future release. Probably within the 
next month. Thanks for the tip!

Original comment by ken...@kentonprice.com on 2 May 2013 at 12:33

GoogleCodeExporter commented 9 years ago
I implemented your excellent "off-topic" suggestion in v15 :-)

Original comment by ken...@kentonprice.com on 4 Jun 2013 at 12:39