What i have: currently my app is telling me my current location (coordinates + name).
What i want: To get the weather update of my current location. and i want to update whenever my location is changed.
i have tried a tutorial but that was too much complex for me.
To my knowledge you need a server support for the same.
I saw the tutorial, which parses the HTML page in "Beginning Android".
If you want that to be in specified format, then you need server support. Try searching for free server providers.
Use google weather API, you will get a XML response
Replace the city-name placeholder with the city detected
http://www.google.co.uk/ig/api?weather=
I have created a sample project with my own Yahoo weather api wrapper.
You can find it here.
https://github.com/zh-wang/YWeatherGetter4a
Try Metwit weather API.
It's simply to use, what do you need is only a lat, lng and a GET request.
If you can implement them client-side: 200 request/day (ip based throttling) no authentication required. Worldwide coverage, JSON and REST compliant.
Here the documentation of the weather resource.
Disclamer: I own this API.
Related
Is there some Google Maps API for Android that could return time between two places using public transport (and walking)? Something like Google Maps does when selecting public transit, but I'm interested only in times.
Also, is there way on Android to get list of nearest transit stops (from given location, not necessary phone)?
you can refer google direction API .it provide all types of details. it gives a response based on JSON or xml. if you refer json then pass in url json.
used retrofit for getting direction API response and bind getting data according to google map.
below url is give all data..
https://maps.googleapis.com/maps/api/directions/json?origin=ahmedabad&destination=faizbad&mode=transit&language=gu&key=AIzaSyCMNK9WsbC2vgvMB_trDOjTs2QUvOd7ECw
more information u can refer below link
https://developers.google.com/maps/documentation/directions/intro#TravelModes
Hi below is the link which helps you for which you want
https://developers.google.com/maps/documentation/distance-matrix/intro
Where you find request URL throw which you can find distance or time duration between tow place using different-different parameter
Below is the sample URL for use
https://maps.googleapis.com/maps/api/distancematrix/outputFormat?parameters
You need to pass your API key in parameter compulsory.
I want to make a android app using google maps.In this app I want to share my location to my friend like a request, Once he accepted my request he will get the route map to my location (previously I shared) and also I want to see his moving path towards my location. Can any one please suggest me how is possible to sharing locations.
I think the best way to control that sharing is using socket.IO
on the device you catch your position then emit your position to the server and on the server side you emit to other devices.
Hope helped you
For sharing locations and showing it on map, you need to do it in following steps
Read your location using android APIs.
Once he accepts your request, read his location and share it to your profile through some API to server & keep on updating location on every changed distance delta or at some time interval and share that too.
Now you have co ordinates of both locations. Use them to fill data to Google Maps API and load map in one of your activity. Whenever you will receive updated location of your friend from your server, update the map and draw path between them using google maps api.
For showing map to your location # your friends side, same thing needs to be done. If your location will also change then you will have to provide your updated location to server timely as mentioned in step 2
What if you send a geo: link to your friend? Like geo:62.0,-7.0 ? That should give the receiver a choice between all his geo-capable apps. Google Maps, OsmAnd, maybe some weather service...
I'm new to android Location API and Maps. I was thinking about making an application which can be used to share location of friends and locate them on Google Maps. There are many kinds of apps which exists in the market like Find My Friends by Apple FindMyFriends
The only way which I thought to spot my friends on google maps was to create a database, put their profile information (like name,phone,email-id) and retrieve it back. Is there any other way which is much better than the way I proposed?
Thanks
I had worked on similar projects. I hope my brief info would be helpful to you. You certainly do have to create database and it should be on the server which is accesed by API.
For server part what you need is an REST API which can be created on php , jsp or other. Api handles the request and response data using json(may be other too).
In android its better to use google map api v2 , and use LocationManager or LocationClient classes for getting current location in longitude and latitude format and update it to database by sending request to Api.
I am trying to build my android app with foursquare api, It works fine by using their api
foursquare search venue with "near" parameter and the value "Paris".
But before calling this link, I want to have an autocomplete textbox to help users for searching, however I couldn't find any api to do this. (their suggestcompletion api need to pass the location/geoname as well, that's not what I want)
In their official website / official mobile app, their autocomplete is extremely good. It accepts country name, district name or even a venue name.
Does anyone knows how to do it?
Finally I found that I need to use a webservice from geonames to do the autocomplete, and then use it result to pass the lat and lng to foursquare.
A reference from foursquare link, they use this geonames dataset too.
i want to get the current weather update of my current location in android.
the weather update may b in C or F.
i dnt want any extended forecast values...
flow of my app is like:
it gets coodinates and from the coordinates it gets name of the location..based on that location it must return me the weather condition of that area.
kindly help me out in completing this module. m new to android :)
if possible plz give me code sample.
Thanks in advance :)
There are a number of ways to get that, mostly web services but you need to check the terms of service, a lot of them don't want you to embed them in a paying app
via Weather Underground and others via Msn and Google API National Weather Service REST
You probably just want to search for "[Android] Weather" in SO search bar and find something that fits. Googles Weather API seems to be the easiest Google Weather API Tutorial