开发者

I want to get weather update in android

开发者 https://www.devze.com 2023-03-26 19:59 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消