Broadcast Null error

Put your problem here if it does not fit any of the other categories.

Broadcast Null error

Postby Alawi » Sun Mar 09, 2008 2:35 am

Hello guys,

I am struggling with the following error:

Error receiving broatcast null in myMapActivity$myIntentReceiver

I basically have a map which displays the users location based on KML file (similar to the friendFinder code). And on menu selection the programs jumps to another listview and this is where I usually receive the error. I am unregistering the intent onPause() and registering it onResume(), again very similar to the friendFinder code.

Any insight on this will be highly appreciated.

Ali
Alawi
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Mar 09, 2008 2:17 am

Top

Postby plusminus » Sun Mar 09, 2008 12:24 pm

Hello Alawi,

I've had (probably) exactly the same problem with my AndNav!-Application.
The problem is that you are using an (not static) Inner Class which is no more usable if your Activity-Object stops existing.

I solved the problem, by simply making the receiver-class static. (plus adding a small constructor, taking the reference to the Activity, which I needed)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Praline » Thu Mar 27, 2008 10:11 pm

Hi,

Got the same error, I made the receiver-class static (+ a small constructor) but I continue to get this error :(.

Regards,
Praline
Praline
Junior Developer
Junior Developer
 
Posts: 11
Joined: Tue Feb 12, 2008 3:53 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 31 guests