Im trying to create a very simple application that I will use to present a product that my team and I are creating. In my app, I would like to allow an option where if a specific textview is clicked, it will open up a map to that specific location. Of all the tutorials of the google maps that I have seen, it seems that the only way to use the maps is to have your class extend the mapactivity class. Is there any way to use this simple app other than to make my app a map based app? Also which version of the google maps would be the best to use in my situation. Thanks for everyone's help.
What do you mean by a "map based app"? if you want to embed Google Maps in your application, today you would use Google Map API V2 as V1 is deprecated. in that case you don't have to extend your Activity from MapActivity and you can use a simple Activity if you targeting API > V11. if you target lower API's you would extend you Activity from FragmentActivity to allow backward compatibility for Fragments.
Here is a blog post I wrote with all the details on how to embed Map capabilities in your application:
Google Maps API V2
If on the other hand you would like to avoid embedding Google Maps in your application, you could just fire an intent to turn on the native Google Maps application.
UPDATE:
Take a look at this page for intents you can fire for native Google applications (including Maps):
http://developer.android.com/guide/appendix/g-app-intents.html
and look at this questions:
Launching Google Maps Directions via an intent on Android
Using the pre-installed Google Maps instead of an own activity by using Intents?
Related
I have a user-scenario in which a dedicated set of point-of-interests (POI) should be searched/visualized/routed-to in Google Maps or Microsoft Bing. Since all of the functionality is provided by all major built-in map-applications, I'm curious if I can somewhat solve this problem by one of these three options.
Custom Android App: Implement a map that uses Google Maps activity and retrieves the POIs from a custom backend.
Android Service: a service without a front-end that provides the POIs as a searchable ContentProvider. The user may search for the POI and visualize it in the built-in Google Maps app.
Whitelabeled app: existing app extended by list of POIs. But which one?
Any other option: is there any other way to provide custom POIs to Google Maps on the phone?
Glad for your input to the discussion.
I want to use Navigation just like google maps in real time.
Can we transfer data from google map to my android app in real time?
The Google Maps app for Android exposes several intents that you can use to launch Google Maps in display, search, navigation, or Street View modes. If you want to embed a map in your app, refer to the Google Maps Android API Guide on the google maps API site.
I'm developing an app and I'm trying to integrate to my app a google map. I'm reading that I need to create a special app at the beggining. I tried to ignore it and tried to integrate it anyway. But when I try to extend my class with MapActivity, it doesn't find it. I generated the Key, Google Play Service is up to date. I probably miss something.
Thanks for the help.
MapActivity was part of the Google Maps Android v1 API which is now deprecated.
Use MapFragment if possible
https://developers.google.com/maps/documentation/android-api/
You need the new integration in Google map you want to use the new Google map api in android.
So follow below link for integration google map with "MapFragment".
http://www.tutorialspoint.com/android/android_google_maps.htm
Hi guys I'm new on android dev and I wanna ask you some questions about the potential of bing maps on android because Google Maps I've in my first app doesn't allow me on v2 api to remove business POI. So I've decided to use bing maps because I've seen that it has this opportunity, but I wanna ask you if I can call gmaps for navigation to a location from my app that use bing maps.
If you wanna suggest any other maps that allow to remove POIs made by map it's very appreciate
First off, Bing Maps doesn't have an option to remove the POI's that are on the map tiles. Want to make sure you are aware of that before you get too far here. As for mixing the data from two different map providers, this isn't generally allowed. However if you are just launching the other app this shouldn't be much of an issue.
I am new in android programming, I had problem in showing Map with getting the location that is touched, could any one help. Here please me code bellow. Thank you in advance.
Note: I took the code from this site, I used displaying the Map and it was working but when I am trying to use the last code in the site for display the touch location, does not work.
After seeing the link you have given for code reference .i have seen that you are developing with the old outdated API V1 for android which will not work now because the new Maps API V2 for android is now applicable.
Find more about the new API HERE on Android Developer Site.
The API is now distributed as part of the Google Play services SDK,
which you can download with the Android SDK Manager.
Maps are now encapsulated in the MapFragment class, an extension of Android's Fragment class.
Now you can add a map as a piece of a larger Activity. With a
MapFragment object, you can show a map by itself on smaller screens,
such as mobile phones, or as a part of a more complex UI on
larger-screen devices, such as tablets.
Because maps are encapsulated in the MapFragment class, you can
implement them by extending the Android standard Activity class,
rather than extending the MapActivity used in version 1.
The Maps API now uses vector tiles. Their data representation is
smaller, so maps appear in your apps faster, and use less bandwidth.
Caching is improved, so users will typically see a map without empty areas.
Maps are now 3D. By moving the user's viewpoint, you can show the map with perspective.
See my blog posts i have tried to summarize all there is needed to build an App with Google Maps API V2 for Android.
Solution to Problems with Maps API V2(using google_play_services_lib).
Creating an Android App with Maps API V2 for minSDK=8 (Android 2.2 Froyo).
Creating an Android App with Maps API V2 for minSDK=11 (Android 3.0 HoneyComb).
I've played with the Google Maps Android Library V2 a bit.
Here is an example I did that works, see if it can help you.
I stripped out my own API key, but i've included many different parts including the need to setup:
http://www.digitalopium.com/android-google-maps-api-tutorial/
-Debug/Retail Certificates and the SHA-1 key
-Google Project and the Android Map API key
-Google Play services via the Android SDK
-Project setup including the manifest file and code snippets.
Google has changed the method of obtainig map keys, previously it was using MD5 fingerprint
Now you can follow the link to integrate the map
Integrating google maps in android applicaiton
This tutorial has a section about getting location from touched position. Hope it will help you. Google Maps Android v2 Tutorial