Reputation: 83
I am creating an app in android.
In this app I want to show google Map after clicking on a button.
I have declared the button and listener.
But my problem is I want to call another activity class in the action listener and show google map.
But it is not working, I changed emulator from google to Android it worked but calling google api shows me error.
How can i fix this ?
Upvotes: 3
Views: 109
Reputation: 5260
to navigate from one activity to MapActivity use the code on the button listener as follows
Intent intent = new Intent(context, MyMapActivity .class);
startActivity(intent);
do not forget to register MyMapActivity in yours manifest, to write code for MyMapActivity please follow
http://codebybrian.com/2012/12/06/google_maps_android_v2_sample.html
Upvotes: 1