Leak IntentReceiver on com.google.android.maps.NetworkConnectivityListener

719 views
Skip to first unread message

Tobia Loschiavo

unread,
Apr 10, 2012, 7:02:39 AM4/10/12
to android-support-v4...@googlegroups.com
Hi,

first of all thanks for this wonderful project. I have tried my app on a device running froyo and when I try to finish the activity (a DashboardActivity) I obtain this:

com.example.client.ui.DashboardActivity has leaked IntentReceiver com.google.android.maps.NetworkConnectivityListener$ConnectivityBroadcastReceiver@4a64bca8 that was originally registered here. Are you missing a call to unregisterReceiver()?

DashboardActivity doesn't use Maps. I am using ActionBarsherlock (I don't think it is the cause).
This bug doesn't happen on Ice Cream Sandwitch.
Can you help me?

Thanks
Tobia

Taro KOBAYASHI

unread,
Apr 10, 2012, 10:43:05 AM4/10/12
to android-support-v4...@googlegroups.com
Hi,

In short, I think it's caused by the restriction of MapActivity.
Only one MapActivity is supported per process.

my fork version avoids this.
for the details, (may be tl;dr)

Taro Kobayashi

Tobia Loschiavo

unread,
Apr 10, 2012, 3:49:26 PM4/10/12
to android-support-v4...@googlegroups.com
Thanks very much Taro, I will definitively try that!

Cheers,
Tobia 

Tobia Loschiavo

unread,
Apr 13, 2012, 5:57:22 PM4/13/12
to android-support-v4...@googlegroups.com
Sorry Taro if I bother you. I cannot compile the code with ant. Does a pre built jar exist? Also with eclipse the compiler complains about the lack of FragmentActivityFeature.

Thanks
Tobia

Taro KOBAYASHI

unread,
Apr 13, 2012, 8:30:36 PM4/13/12
to android-support-v4...@googlegroups.com
> Does a pre build jar exist?
yes. 

for compiling problem, my work is done on experimental-fragment-activity-feature-impl-r7 branch
but, it's not easy to find. 
so I will do my fix in master from now on!

I pushed my works to master.
I think the latest master can be also compiled on your environment.

thank you for reporting the problem!

Alberto SOUZA

unread,
Jul 16, 2012, 9:51:34 AM7/16/12
to android-support-v4...@googlegroups.com
Hi,

I'm using your fork version and, i am still getting the same error. Do you any other tip about the subject?

Thank,

Alberto

Alberto SOUZA

unread,
Jul 16, 2012, 10:12:55 AM7/16/12
to android-support-v4...@googlegroups.com
I had to use the separate process solution but, i have to say, the solution is not a very good one.. The application loses performance... Is there another way?

Pete Doyle

unread,
Jul 16, 2012, 1:12:25 PM7/16/12
to android-support-v4...@googlegroups.com
Hi Alberto,
Are you using my fork [1] or Taro's from earlier in this thread?

If mine, I think its likely a bug in Google's mapping library, or maybe something like this:

Thanks,
Pete

Alberto SOUZA

unread,
Jul 16, 2012, 1:42:59 PM7/16/12
to android-support-v4...@googlegroups.com
Hi, nice question, right now i don't remember what i am using. The version with the bug fixed, is yours or from Taro's fork? Sorry about my bad memory...

Alberto SOUZA

unread,
Jul 16, 2012, 9:39:19 PM7/16/12
to android-support-v4...@googlegroups.com
Hi, i tried to use the fork version from Taro's and, at least in my case, it not worked. The FragmentActivity does not extend from MapActivity and the mapView can't be created. Any tips?

Taro KOBAYASHI

unread,
Jul 16, 2012, 9:44:25 PM7/16/12
to android-support-v4...@googlegroups.com
Hi, I'm taro.

I split the FragmentActivity into two classes. Please try FragmentMapActivity for fragments using MapView.

Alberto SOUZA

unread,
Jul 16, 2012, 9:51:28 PM7/16/12
to android-support-v4...@googlegroups.com
thanks, i did it here... I just took a look at the repo and saw your example. But i have one question, the actionbarsherlock plugin was built with the peter doyle version of compatibility and, because that, i can't use your version inside my app. Do you have any tips?
Reply all
Reply to author
Forward
0 new messages