How to retrieve Google Directions GPS data from real device - android

I'm trying to make an application based on Google Directions (Maps) API. Basically, I'll develop a mobile app which will tell users where to navigate with their cars and I'll monitor the actual trip (route followed, time, speed etc). Then, I'll need to process the data retrieved in order to display it on a web platform and compute some statistics.
My questions is, which API should I use and how? I've actually searched about this topic but I couldn't find something useful (like a tutorial) regarding this subject, given the fact that I'm new in this domain and I don't know how to begin and what to do.
Thus, I would really appreciate if you can give me some steps that I must follow in order to accomplish this. Also, all types of materials (tutorials, documentations, articles and anything regarding that subject and tips for really beginners) would be very, very helpful for me!

Refer the following link for directions API documentation.
https://developers.google.com/maps/documentation/directions/intro
You can refer the following link for parsing directions.
https://github.com/jd-alexander/Google-Directions-Android
On Location Listener,listen continuosly your current location and store in a list and after the trip is completed,You can use that list that which path that the user as travelled and do your algorithm according to your requirement.

Related

Can we get Speed limit information from Waze APIs?

I've been trying to develop speed limit application & have tried many different approaches to get done .
I have used Overpass APIs & it did good but it did not have speed limit information for few of locations around Europe & also installed Velociraptor which uses OSM map & HERE Maps APIs still they failed to get data . Here is screenshot of Velociraptor app :
Yesterday I came across osmbonuspack & it looks promising as it allows us to choose from 3 best routing services available but Author of osmbonuspack told me that unfortunately, the 3 routing services are not returning speed limit information. Refer : Is it possible to get speed limit data using OSMBonusPack?
I have installed Waze application & it has speed limit data for locations around Europe which are not available from above options. So , anyone has a idea how they are getting information OR anyone knows which datasource they are using ?
Any suggestions would be appreciated.
I'm afraid Waze does not use another data source or at the very least not one unique data source that you could use. As a crowd-sourced application it relies on the information entered by map editors via the Waze Map Editor. Some editors might have used some open data sources available for their regions (if permitted by their local organisation), but it's far more likely they've used their local knowledge, Google Street View (Waze has a special license for that) or user reports sent in via the app.
As the map used by Waze is not open data, I'd highly advice against attempting to retrieve the speed data from their map. They have not exposed this information in an open API, which should be a strong indication that reuse of this data is not permitted.
OSM tagging is rich and flexible, but can be quite difficult to interpret.
Typically, max speed information is certainly there (the various routing services are based on it). The point is: how it's defined?
Have a close look here: http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed
And you will discover that getting maxspeed tag is not enough...
Then, refining your Overpass queries, maybe you will be able to get it everywhere!
Other hint: look at OSRM source code (or ask them), to see how they get this information.

Android - find image link API

Hey !
I have an Android app where the user can search on a specific subject, let's take the word "Cats" for example. When the user submits the search I want to find an image similar or on the subjects the searched for. A search engine for images more or less. I want something "easy" to deal with, so I thought about integrating the Google Search API into my app. Let the user search Google, and take the first image that comes up.
However, I haven't found any example and I just need a push in the right direction. If you could give me an example API for my needs, that'd be great.
Apparently the Google Search API never was fully deprecated it's still up and running. It provides JSON data and is easily parsed with Android.
If anyone else needs an image API here's a test search: https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=searchquery&rsz=8&start=1&imgsz=small|medium
And the JSON reference: https://developers.google.com/image-search/v1/jsondevguide

possibility of a real time turn by turn guidance navigation app using MapQuest on Android?

I would like to create a navigation application, with mapquest sdk for android, that gives real time turn by turn directions using GPS after a route is created, like when you start a navigation on google maps on button press. Is it possible to implement the feature using just the mapquest sdk or would I require any other api.
Say if there was a possibility, then, is there a way to extract that guidance('turn left/right') cue and use it with in the program?
Yes, it is possible. I'm currently developing my Bachelor Thesis (a mobile navigation service) with the MapQuest API for Android. So as soon as I submitted it I can offer you the source code, too (will be in about a month). However, I can give you some help of course though.
Here is a nice tutorial from MapQuest of how to implement the route functionality. This is not a real time turn by turn guidance but gives you a first impression where to begin!
You can get all instructions from MapQuest here.
If you prefer another API to display the map this is not a problem as the guidance includes all shape points of the route. I chose the MapQuest API for this though as it is a bit easier to display the map for a first glance. However, I recommend you to draw the route yourself on the map though because the implemented method does not always work properly.
Hope I could help you with that and if you are willing to wait a month, I will post here the link to my GitHub repository with the source code.
Best,
Marius
EDIT:
So I submitted my work and can now give you access to my source code. You find my GitHub repository here.
I think the function getGuidance() in the NaviActivity will be a good starting point for your application. It calls the guidance information from MapQuest and converts the information into a JSONObject. The Route class then grabs the required information and sorts them in arrays.
I hope that this will help you with your application. For further questions do not hesitate to ask :)
Best,
Marius

Totally confused attempting to integrate a map...Best way forwards?

I have been looking to implement a map in my website, and have really hit a brick wall - Have read so much, but am very confused. I just wonder if someone could offer a little help?
I have developed an Android App which generates a list of lat/long pairs and stores them in a remote MySQL DB. All I want to do is mark these points on a map, with a little pop up when clicked, indicating some other information about the user.
I have so far looked at Google Maps API and OpenStreetMap, although I really don't know where to begin! I don't know whether I should use Google Maps, as I'm concerned about the API query limit? Should I be?
Would really appreciate it if someone could point me in the right direction!
Thank you
Showing some markers and popups isn't really complicated with OpenStreetMap and OpenLayers:
simple OpenLayers marker example
dynamic markers from a database (example result)
Use google maps javascript v3 and make the required changes
Please refer
https://developers.google.com/maps/documentation/javascript/
The Google Maps API limit is something like 25k (or was it 250k?) per day - so unless the app you're making proves to be really popular, you won't have to worry about it

Better Understanding Using Google Places Api

I want to develop an application in which i want to display restaurants nearby the user.
Say for example i want to display name and address of restaurants located within 3km related to current location of the android device..
I have done alot of reading online and found different links here on stackoverflow.com
I am aware that I must use the GOOGLE PLACES API, I found this link to this blog on this site Introducing the Google Places API
My problem is how to use android/Java to:
1. Send a request to this url : "https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=MYAPIKEY"
2. Then parse the XML or JSON results from this request and display them in a list for the user to see.
Thank you in advance for anyone that can help.
You may want to look at some online tutorials like for instance
http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/

Categories

Resources