I want to get the current weather update of my current location - android

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

Related

Google maps sharing location

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...

Making a Android chat app and finding people nearby

Hi everyone I'm in trouble one of my friends asked for a chating Android app which it could find "People Nearby" using this app and first I said yes I can make it but now I'm unable to do.
so It's my very first app that I'm making it for someone I wanted to know if "People Nearby" is simple function for an app or it's complicated and hard to make it
I've seen this kind of apps like swarm that shows you people nearby
but unfortunately I can't find any help or source or tutorial for it the only thing I could find was Google's Nearby Messages which I'm not sure that's what I'm looking for
so I would be very happy if you could help me or at least tell me where I can find a help.
Server side:
(You can use python flask for this kind of simple requirement If you do not have experience in server side scripting)
Your API's must have.
/register -> Registering user profile (unique id, name, location etc) and save it in database.
/receive_location -> Receive location (lat lang values), update in the user profile and check with all records in your database who is in the radius(defined by you or get this as from user) and return the list of user details to client.
Client side:
Have an IntentService which will post location of the client to the server at certain intervals returns the list of users who are in the radius you define.
User googleApiClient to get the location and server .
http://developer.android.com/training/location/retrieve-current.html
Use recycler view to show this result. Send a local broadcast from intent service to tell the activity containing recycler view to update it.
Basic requirement for this is you must have server where all user data is stored.
You must have all users updated latitude and longitude.
To get updated latitude and longitude you must call your api at periodic times.
If you want nearby people search you must call api with your current latitude and longitude, then from server and your api must filter all users location and gives you nearby people.

Users of an application on a map

I have seen some applications that display on a map the users who have the application in use or installed.
I'd like to implement something like this in my project, the problem is I do not know where to start ..
anyone know any reference I can read?
This is an image to try to explain what I want
Thanks in advance
Regards
When user installs app, get its location using GPS, send it to your Server save it there.
When you want to show map, get all locations saved on server and display it on map.
You can update user location each time application is launched, updated it on server as well.

I want to get weather update in android

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.

Using Google Transit information in Android app

Google transit provides approximate time of the next bus arriving at a particular bus-stop when you click on the bus-stop icon. This works for trains and even metro lines.
Is there any way I can use these transit information in my own map view? I tried going to the link that is displayed under the timings ( I guess it means thats where google is getting the timings from) but that link is broken...doesnt exist...it must be providing the information to Google only...
So is there any way i can access the Google Transit information?
Thx.
Yes, the data feeds are publicly available and published by the corresponding transit agencies. The available list is here. You'd need to download the data and host it or include it in your app.
In the "worst case scenario", you could download the result of a web query to maps.google.com (such as http://maps.google.com/maps?saddr=new+york&daddr=boston&dirflg=r) to your app and parse the result. Maybe there are even sample-scripts that already do this!
So finally i had to drop the idea...its only available for usa at the link given by #Robby but is (currently) unavailable for quite many countries.
Hoping itll be available soon.
Thx for all the responses.

Categories

Resources