I want to integrate Google Sky Map in my application. Does it have an API?
What steps should be taken to integrate with this service, and how can I integrate it in an application?
Was also looking for a way, but didn't find one.
One of the developers said this 6-7 months ago about integration/API
I'm one of the developers on the Sky Map project. At present there
are no intents defined beyond the search intents. If you just want to
point at a particular named target you could try those. At the moment
we don't support kml or other Intents though.
If you do happen to find some new information, please share.
To call Google Sky Map from within your application:
Intent i = new Intent(Intent.ACTION_SEARCH);
i.setPackage("com.google.android.stardroid");
i.putExtra(SearchManager.QUERY, "mars");
startActivity(i);
Related
I would like to open this directly from my program, is it possbile?
I checked this, but cannot found relevant information
https://developers.google.com/maps/documentation/android-api/intents
If it is impossible, is there any alternative way?
You can't do that from your activity.
In the image above you can see a dialog that catches the voice of the user, this is because Google Maps calling an intent ACTION_RECOGNIZE_SPEECH, and you can't start an intent and after calling Maps.
Here is the only documentation that I found on the internet for that question. The Adding Voice Capabilities. Just remember that these voice actions are task-based and are built into the Wear platform. So you need to use Android wear for that, see Maps API on Android wear.
Just read the two documentation to understand more. Also take note, that do not violate any terms of service on the Google Maps. Here is one example question for that.
So far, I have not used this voice capablities, so I'm not sure if it will really help you, but I think I give you a small idea with it. Goodluck and Happy coding :)
I am looking for a way to open turn-by-turn navigation on Google Maps. I know that from this google article it can only be defined by start and end points.
First option (preferred):
I haven't find any intent in Google Maps that does exactly what I want. Does anyone know if there is one?
Second option:
I have tried other ways to reach what I want. I have tried to create a custom route on maps.google.com (from desktop browser) and open it from Android device.
The link has the following format
https://www.google.com/maps/dir/37.7851009,-122.4049193/37.7817261,-122.4008209/#37.7815141,-122.4059922,16z/data=!4m19!4m18!1m15!3m4!1m2!1d-122.4055931!2d37.7834466!3s0x808580868ad307fd:0xa75b816ccbe984a0!3m4!1m2!1d-122.4061769!2d37.7812298!3s0x80858086b49a3cfb:0x23f20e98c029217c!3m4!1m2!1d-122.4031591!2d37.7817777!3s0x80858080cb0a7eb1:0xdc77f5df810aebcd!1m0!3e2
Instead of opening turn by turn navigation, it open Google Map Android application with the route displayed on the map. This is the nearest of what I want because there is the button that can show turn-by-turn navigation.
I don't know if it is possible to create link of this type from a collection of (lat,lng) geographical points. I see that data parameter is the one containing the route.
Does anyone know how to reach it? If it is possible, I think that I can create links in my Android app to open with Google Maps App. (Actually I haven't tried to put this link manually to my app, but I assume this to work.)
Update:
I don't want to find a route from point A (start point) to point B (end point). I have all the route from start to finish in geographical coordinates. So, any solution that is of the form direction from A to B are not solution to my problem.
As of 2018, you can open Google Maps app in navigation mode using the Google Maps URLs. Google Maps URLs build a universal, cross-platform URL to launch Google Maps, so you can use them with your intents.
The Google maps URLs in navigation mode support origin, destination and waypoints.
E.g.
String url = "https://www.google.com/maps/dir/?api=1&destination=Madrid,Spain&origin=Barcelona,Spain&waypoints=Zaragoza|Huesca&travelmode=driving&dir_action=navigate";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
I hope this helps!
This is from the Documentation:
Alternatively, you can supply an encoded set of coordinates using the
Encoded Polyline Algorithm. This is particularly useful if you have a
large number of waypoints, because the URL is significantly shorter
when using an encoded polyline.
Encoded polylines must be prefixed
with enc: and followed by a colon (:).For example:
waypoints=enc:gfo}EtohhU:
You can also include multiple encoded
polylines, separated by the pipe character (|). For example:
waypoints=via:enc:wc~oAwquwMdlTxiKtqLyiK:|enc:c~vnAamswMvlTor#tjGi}L:|via:enc:udymA{~bxM:
The following URL initiates a Directions request for a route between
Boston, MA and Concord, MA with stopovers in Charlestown and
Lexington, in that order:
https://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&destination=Concord,MA&waypoints=Charlestown,MA|Lexington,MA&key=YOUR_API_KEY
Source: https://developers.google.com/maps/documentation/directions/intro#Waypoints
You can try to check this documentation/tutorial on how to use turn by turn directions with the Google Maps API. It uses Google Maps Javascript to provide advanced functionality.
And about voice navigation feature, I think this SO question and link can help you.
Voice navigation possible in google map api?
Turn-by-Turn Navigation for Walking and Driving
Hello my name is James,
I am self-learning how to develop android applications, I have designed few basic apps – to name a few calculator app, notepad, percentage calculator for android. After developing few small basic apps, I am planning on making more advance apps, I am planning on creating an app that allows the user to tag their location on google map or geotag images using the application, which will only be visible to them. For example, the user can tag location to a map and later on get directions to that location or take an image of a location and geotag it to the map and add some sort of description to it.
I have been searching on google for some time now, on how I can go about designing this app but I haven’t really found any tutorial / guides how to implement the image geotagging / location tagging to google map.
Please can someone give me some guide, something to read upon or maybe correct me if am not searching for the right materials.
So far, I have carried out searches including:
How to add google maps to my android application (I found a good guide for this and I understand how I can do this)
How to implement geotagging on your android application (Haven’t found any useful material apart from few applications released on play store)
How to implement location tagging (Haven’t found any useful material for this either)
I found a video on YouTube where the person has designed a similar app that I am planning on doing http://www.youtube.com/watch?v=_V49bXXtnvU but other than I have only come across videos / guides that shows how to add google maps to your android application something like http://www.youtube.com/watch?v=awX5T-EwLPc
Thanks for your time.
I'm not sure if you found your answers already, but in case you or someone else is still looking:
- http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html
I found that tutorial helpful in getting started with MapsActivity. If you are using Android Studio then just start a new project with the main activity selected as Map activity. This will start you off with a lot of the necessary code for starting the Google Maps API. It will walk you through how to get your google api key for your app.
Once you have that set up, then look at the several listeners that are available for the map. Some that you may want are Map.setOnMapLongClickListener, Map.setOnMarkerClickListener, Map.setOnMarkerDragListener. These will help you decide what to do with locations on the map.
Look at the Marker class to be used Google Map. You will set your tags/markers with this class. You can replace the default marker with your image if you like or create your own custom tag. https://developers.google.com/android/reference/com/google/android/gms/maps/model/Marker?hl=en
You can use LocationManager to get your current location. Here is a simple tutorial: http://javapapers.com/android/get-current-location-in-android/
If you plan on providing Camera within your app or get images from gallery, you should review the Camera Class :
http://developer.android.com/guide/topics/media/camera.html
and a simple tutorial:
http://www.tutorialspoint.com/android/android_camera.htm
I would add one feature at a time when starting your app project.
Create the map with working key and make sure it displays a map.
Then, add a marker on your current location (on an emulator, you will have to set the default location because it will not have gps).
Then, allow the user to add a marker by i.e long pressing on a map location.
Then, open a dialog box of choices when long pressing on map, i.e tag location, tag with custom tag, tag with camera image, etc.
I am doing the project about map navigation. Currently I work fine with the mapview with GPS and singal route directing. But I can not find anyway that, show the all possible choices on the map, like google map on web.
For example I like to search what restaurants are around my area, so I type "Restaurant" in search bar and search it, the map shold display my current position (I have done this) and also show all the possible restaurants that near my area. After that I pick up one restaurant, and the map will draw the route from my position to the restaurant (I have done this too)
I have spent many time search on internet but couldn't find any critical example explain about this, is there any tutorial I can refer to?
Should I use "webview" to directly show the google map web page on app?
I also meet other problem, I use the way below to directe my route on map, it suppose to draw the route on my app, but insted of that the phone will directly oepn google map and drawn the route on google map, am I do this wrong? Is there any better way?
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setData(
Uri.parse("http://maps.google.com/maps?f=d&saddr="
+GeoPointToString(fromGeoPoint)
+"&daddr="
+GeoPointToString(toGeoPoint)
+"&hl=cn")
);
startActivity(intent);
I am the very new beginner of android programming, hope this is not a silly question, wish you can help me. thanks
If you're trying to make an app using Google Maps, you should use the Google Maps API!
https://developers.google.com/maps/documentation/android/
You should be able to download it via your SDK manager in eclipse, or manually install it. I'm using it at work right now, but be wary that you cannot make a commercial app for navigation using these maps.
In my android project I want to draw route on Google maps. I have coordinates of start and end points. On this points I get km-file from Google web service with points witch across route. For drawing parts of route I use instances of Overlay class. And this solution works, but very slowly. Are there another methods to do that? May be exists ability use built-in Google maps application or any another way?
Right, you can use the built-in google maps application via an intent like this:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
startActivity(intent);
see this question for more details
there's a tutorial for using KML here:
http://csie-tw.blogspot.com/2009/06/android-driving-direction-route-path.html
and some sample code here:
How to draw a path on a map using kml file?
it all looks like a lot of overly-complicated hard work - Google should provide API's for this instead.