how to use google map in android 2.3 application - android

While I am trying to extend my class to MapActivity it is show error like "no suggestion available". I had installed all the google apis.

You've to set the your project Target as per below image -
And, have a look at Google Mapview tutorial Don't forget to create an AVD as per same project creation with Google-API like below one

Related

How do I render a map activity on android studio

I'm very, very new to Android and am currently trying to develop an app dealing with location. I want to start off on a map activity but after the first few times of rendering it correctly, it started giving me unrendered frangments and a rendering error. Pls Help.
Use the MapActivity provided by google in android studios.
Also make sure you have entered correct API key.
You can use this default activity on Android Studio.
Then, make sure you have an API key from google. Here's the link:
https://developers.google.com/maps/documentation/android-api/signup
After that:
Note: Always make sure that you are connected to the internet for the maps to render. Hope this helps!

How do I add a Google Maps fragment to an existing tabbed project?

I have successfully got Google maps working in Android Studio in an independent application. I also have a Sliding Tabs application working. Both are from scratch. But, How do I add a Maps fragment to an existing sliding tabs application? I have tried adding a "New > Google > Google Maps Activity" to the Java section along with the other code, which appears to load the libraries and code, but results in problems with the Build/Run configurations?? "Importing" modules don't appear to help, but I am probably doing something wrong. I am happy to set things up manually if I need to, but I don't know how to get all the libraries loaded to make Maps work in an existing application.
Cheers,
Chris
A little bit code would be helpful.
Create a MyMapFragment that extends MapFragment or SupportMapFragment.
Then modify your MainActivity to load that fragment when clicking on the map-tab.
Also make sure you added the PlayServices correctly and you inserted a working maps API key in your manifest.

snapshot of current location of map in android

I am trying to develop an app that can take a snapshot of current location from Google map and send an email (All this by click of a button)
I would like to do this in the background.
Is this possible?
I was trying out:
http://goo.gl/krFqXu
But the above code supports FragmentActivity, I am developing the app extending an activity.
Is it possible to use the same code in extending an activity? if so how? I am getting error in the following place:
myMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map_pass_home_call)).getMap();
If your question is only "How to not use Support lib", you can do this:
myMap = ((MapFragment)geFragmentManager().findFragmentById(R.id.map_pass_home_call)).getMap();
The support library helps you to support devices with an old version of the API. It seems you don't need that, so every sample code you found on the web that is using the "support" library always have a simpler equivalent in most recent version of the API.

Android: How can i change the Build Target of one class

I have a project with Build Target Android 2.1 and i want to use Google map in it.
I know that to use the Google map i should create a project with Built Target Google APIs.
I want to extend MapActivity in one class not for all the project.
How can i do it?
I have one question: Google Map is a option in your app. or permanent feature?
In the first case I think you can encaplusate you code for Google Map in external jar.
In the second case I should change to GoogleApi(Android 2.1)

Android emulator map is not visible

I have added a MapView element in my android project. The project is not showing any error, but when i run the application on my emulator (Google API 2.2), the map isn't visible. Instead only the grid lines are seen. The DDMS is giving me "java.net.UnknownHostException: android.clients.google.com" exception. I have already added INTERNET permission in my application.
You have to get a Map's API key from google to see the map.
http://developer.android.com/guide/tutorials/views/hello-mapview.html
In this link there is described how to use the mapview.
Same thing happened to me: I followed the tutorial, opened the application, and all I got was grid lines. In my case, my computer was attached to working internet, but my Android device was attached to a network that had become broken.

Categories

Resources