Open GoogleCodeExporter opened 8 years ago
this Exception is with v17
Original comment by syt...@gmail.com
on 18 Jun 2014 at 12:52
I have check in LocationBroadcastService line 295 is
mLocationClient.disconnect();
maybe this will fix gms nullPointer:
try {
mLocationClient.disconnect();
} catch (Exception e){
Log.e(LocationLibraryConstants.TAG, TAG + ": onLocationChanged: " + e.getMessage());
}
Original comment by syt...@gmail.com
on 18 Jun 2014 at 1:01
And in LocationLibrary too:
public void onConnected(Bundle arg0)
{
if (mLocationClient != null) {
final Location mCurrentLocation = mLocationClient.getLastLocation();
try {
mLocationClient.disconnect();
} catch (Exception e){
Log.e(LocationLibraryConstants.TAG, TAG + ": onConnected: " + e.getMessage());
}
if (mCurrentLocation != null) {
if (LocationLibrary.showDebugOutput) Log.d(TAG, "Last location lat=" + mCurrentLocation.getLatitude() + " long=" + mCurrentLocation.getLongitude());
PassiveLocationChangedReceiver.processLocation(mContext, mCurrentLocation, false, false);
}
}
}
Original comment by syt...@gmail.com
on 18 Jun 2014 at 1:04
java.lang.IllegalStateException: Trying to unbind a GmsServiceConnection that
was not bound before.
startServiceAction=com.google.android.location.internal.GoogleLocationManagerSer
vice.START
at com.google.android.gms.internal.bs.b(Unknown Source)
at com.google.android.gms.internal.bh.c(Unknown Source)
at com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService.c(LocationBroadcastService.java:172)
at com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService$1.run(LocationBroadcastService.java:120)
at java.lang.Thread.run(Thread.java:856)
An other error is appear after try catch.
Maybe this check before disconnect can replace try catch:
if(mLocationClient.isConnected())
Original comment by syt...@gmail.com
on 18 Jun 2014 at 1:47
Please supply details of your device, Android version, any mods, etc.
Original comment by ken...@kentonprice.com
on 19 Jun 2014 at 8:16
Tablet Asus ME371MG Android: 4.1.2
I have use ACRA and this is part from the log file:
06-18 16:17:46.226 E/GmsClient(22645): Calling connect() while still connected,
missing disconnect().
06-18 16:17:46.236 E/GmsClient(22645): Calling connect() while still connected,
missing disconnect().
I have add if(!mLocationClient.isConnected()) before all connect() and this
error disappear.
Original comment by syt...@gmail.com
on 19 Jun 2014 at 11:14
Thanks for that. I'll implement it soon. I really should move this to Github so
I can accept pull requests :-)
Original comment by ken...@kentonprice.com
on 19 Jun 2014 at 11:42
Yes move to github is good idea ;)
Original comment by syt...@gmail.com
on 19 Jun 2014 at 2:41
Original issue reported on code.google.com by
syt...@gmail.com
on 18 Jun 2014 at 12:51