Real time tracking of android device on server request - android

I'm looking to implement, real time location tracking for android apps.
The server would request a specific device's real time location which needs to be shown on google map. can anyone help me with this.
Thanks

use geo coding google api to do this stuff.... through gps in android write a android app, that should send latitude and longitude position for every 10 or 20sec so that you can make a variable for latitude and longitude so that new value get updated and stored

Related

How to send and receive user's location to database and use it in map [Android]

I'm developing a tracking system between two users using android where both have their own android device, this application should work as follow:
the first user's android device has to discover its current location (latitude and longitude).
the user's location (latitude and longitude) has to be uploaded into a database periodically and continuously once the user's location is changed.
the second user's android device retrieves these latitudes and longitude and then displays the first user's location on a googleMap based on them.
I can discover the user's current latitude and longitude for once easily and the database is prepared to receive them and everything is fine, but how to discover them once they changed and keep uploading them into the database continuously ??
In addition to above comments as they perfectly gets user location and for sending location to database use firebase realtime database (you can try it for free) and like a chatting app send users location periodically and receive the same in others mobile by getting the Json from realtime database.
Moreover if you want to limit it between 2 users assign the user same topic"". For more information please deep dive into firebase.
There is an overriden method called onLocationChanged in LocationListener which provides us latest Location whenever user place gets changed.
Reference: LocationListener guidelines
Hope this will help.
Put the same code of fetching current location in onLocation changed. That will automatically update the values every time when change is there in position.

Get exact GEO location like lat and long in Android

I have created simple android application which take current Latitude and Longitude from google api. then it will store that data to server.
My problem is that every time when i am try to get the Location it show me different value. same place and same phone then also it fetches different data.
this problem is very critical because i am doing some functionality based on the difference of the Latitude and Longitude.
can you tell me how can i get the same lat and long in each devices ?
Thanks in advance
Does it display huge differences or just ~50-100m differences? Because GPS isn't exact (plus it depends on connections, ...).

Real time tracking WebAPi for Google Map with Ap.net WebAPI

I have a project where I have to create the Web APi for Android on Real time tracking of app.
How can I implement the real time tracking and if one device send (Post()) the data say latitude and longitude. So where I store that lat and long So if and another device ask (Get()) for that data I can return that.

Error to convert latitude and longitude to location description

I'm developing an Android app to integrate with another app.
In this app I need get the current user location and send it to the other app.
I'm getting the latiude and longitude using the following web service:
https://maps.googleapis.com/maps/api/geocode/json?address=Rua+Vergueiro,+1883,+S%C3%A3o+Paulo,+Brazil&sensor=true
The problem is that when the other app receive the latitude an longitude and convert it to address description, an wrong address is showed to the user.
The other app is using the here.com web services to convert the latitude and longitude to address description and Im using googleapi.
Anyone knows tell me what may be happening?
Thanks.
You are geocoding using one service (i.e. Google) and reverse geocoding using a second service (i.e. HERE) and the underlying data is different for each one. As it happens, the location you are looking for is at a junction as shown here
If you run a reverse geocoding search for this location, then the closest location found by HERE is around the corner at Rua Jardim Ivone - the second closest result found by HERE is the same as Google - Rua Vergueiro. As you can see from the picture this is correct - the closest house on the map to the stated location given is actually around the corner.

How to get Latitude and Longitude from mobile device Android

In my application I want to use the users' current latitude and longitude. I use the following example.
Still I did not get the answer.
Can emulator displays the latitude and longitude?
How shall i get latitude and longitude from the IP address??
quick response will help me a lot.
There are some different APIs you can use to get a IPs location. This post mentions a few.
Your linked answer uses GPS to get the current position. The Emulator does not have a working GPS-module, so when testing this in the emulator, you can add fake-data for the lat. and long. so you can test the code. More here: How to emulate GPS location in the Android Emulator?
If you want to get a location on an IP-address, you can use certain services for that. This has already been discussed here: What's the simplest way to get a user's latitude and longitude from an ip address
As mentioned in the linked post, I'm not sure about the accuracy of those services.
I dont think there is a possibility to return position data from an IP adress possibly the country but not pin point exact (altitude, longtitude) therefor you need to return device gps data wich is transfered though the internet but has nothing to do with an IP adress..
I have finally found my mistake. the example given HERE works fine.
And the mistake was mine. In the location Setting in my mobile, i forget to check the mobile networks option. once i checked tat option i got the latitude and longitude for my current location.
Try http://www.iptolatlng.com/ , it provides JSON and JSONP results

Categories

Resources