Status Update
Comments
fe...@gmail.com <fe...@gmail.com> #2
in...@gmail.com <in...@gmail.com> #3
The implementation of my project is not different from the example project attached by fernando.
[Deleted User] <[Deleted User]> #4
ub...@gmail.com <ub...@gmail.com> #5
fi...@gmail.com <fi...@gmail.com> #6
de...@gmail.com <de...@gmail.com> #7
As an alternative I am using FusedLocationProviderClient with PendingIntent:
IntentFilter intentFilter = new IntentFilter(ACTION_LOCATION);
registerReceiver(locationReceiver, intentFilter);
mFusedLocationClient.requestLocationUpdates(mLocationRequest, locationPendingIntent);
and
unregisterReceiver(locationReceiver);
mFusedLocationClient.removeLocationUpdates(locationPendingIntent)
Here is forked LocationUpdates repo with LeakCanary installed and an option to switch between LocationCallback and PendingIntent. LeakCanary not reporting anything when using PendingIntent.
sa...@google.com <sa...@google.com> #8
ub...@gmail.com <ub...@gmail.com> #9
di...@gmail.com <di...@gmail.com> #10
je...@google.com <je...@google.com> #11
ub...@gmail.com <ub...@gmail.com> #12
There is an issuetracker Component available these days for Play Services Location:
Maybe move this issue to that Component to track it better?
je...@google.com <je...@google.com> #13
I can't move it right now, but I think it's ok to stay here.
As I wrote in the code lab issue, I misunderstood when the rewrite went out (which should fix the issue).
It goes live in version 20 (current version location 19.0.1). The engineer who wrote the rewrite checked and wasn't seeing the same issue, i.e., it should be resolved.
However, that does mean we have to wait until 20 is released. I can check in again here when it's live for you to double check.
br...@gmail.com <br...@gmail.com> #14
je...@google.com <je...@google.com> #15
I haven't been on location in awhile, but I wanted to follow up on this.
The issue should be resolved with
Description
Call LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); will result in a leak. Even though I'm calling removeLocationUpdates, disconnect, unregisterConnectionCallbacks and unregisterConnectionFailedListener inside onPause/onStop.
See attached project file.
- What happened:
LeakCanary reports a leak in an internal class from the package com.google.android.gms.location.
See attached log.
- What you think the correct behavior should be:
There shouldn't be any leaks.
Android version 6.0
Google Play Services 9.8.0
Related issue: