Getting a NullPointerException

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

Getting a NullPointerException

Postby -A- » Sun Mar 13, 2011 3:28 pm

My basic aim is to launch an activity from within another, and have
the result of the second activity be returned to the first. Problem
is, the second one keeps crashing. LogCat reveals that there was a
NullPointerException at the first after the second activity was
finished. Do I have to apply certain intent filters to it, or put some
other attribute in the manifest? Am using the onActivityResult method
in the first activity, and just and using

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. setResult(RESULT_OK, new Intent().setAction(sLat + ',' + sLon))
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


in the second activity, where sLat and sLon are strings.

Help would be appreciated. Thanks.
-A-
Freshman
Freshman
 
Posts: 6
Joined: Wed Mar 09, 2011 11:47 pm

Top

Re: Getting a NullPointerException

Postby raj_J2ME » Mon Mar 14, 2011 6:41 am

Could you please try to debug the code and get the actual location of the code where the Null Pointer Exception is occurring. You can debug the project or even you can use the System.out.println's. Try to print the values which are required to move to the first activity.
Thanks with Regards,
Raj - The Kernel
raj_J2ME
Master Developer
Master Developer
 
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,

Re: Getting a NullPointerException

Postby raj_J2ME » Mon Mar 14, 2011 7:14 am

This is another, same discussion going on and it can be of any help for you.
http://www.anddev.org/other-coding-problems-f5/back-from-activity-problem-t51677.html
Thanks with Regards,
Raj - The Kernel
raj_J2ME
Master Developer
Master Developer
 
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: TurnitinBot [Bot] and 18 guests