I have a made custom popup marker. There is a button on the popup that
shows up when you click on a marker on the map. Its function is to
open a new activity when the button is clicked. So in the onClick
function of the setOnClickListener() call, I created a new object of
the Activity class and used that to call the various methods that
needs to start the activity but I keep getting a
java.lang.NullPointerException thrown regarding the line that calls
the startActivityForResult() method. Not sure of the best way to go
about this. More lights will be much appreciated. I have pasted a
sample code below.

...
readmore.setOnClickListener(new OnClickListener() {
        public void onClick(View view) {

            Intent intent = new Intent( context, ListIncidents.class);
            final Activity activity = new Activity();
            intent.putExtra("items", itemsBundle);
            activity.startActivityForResult(intent,VIEW_INCIDENT);
            activity.setResult( activity.RESULT_OK );
        }
} );

...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to