Share GPS location with no Server - android

I have been researching about sharing GPS location with someone without server.
Is it possible to do this?
I used to develop Android application that can share location with friends, but in that case I had a server to keep the GPS data (Latitude, Longitude) so other mobile can request for JSON data to our server and show data on the Google Map on Mobile. But this time, I don't need a server to keep the GPS data, so Is there any solution to solve this problem? I have been considering about to use the data from Google Account, but I don't no how to access the data of Google Account. Is there any API to access it? I guessed that Google knew where we are every time we use the Android Mobile so can we use their data to share our location ?
Thank you for every suggestions and solutions.

What you're describing is a peer-to-peer arrangement. Check out: http://openpeer.org/, which is an Open Source project that just released a beta Android SDK.

Related

Real time location sharing with Android

What I need to do is share location from one android device and show it on another device(not necessarily android, even web would be fine). I can think of following solutions as of now.
Use GPS to get latitude and longitude from android device and send it to a server after fixed intervals(eg. 5 sec) which will store it in database(Can we use firebase for this purpose instead of writing full server side code from scratch?). The client which needs to show the location can now request data from server every 5 secs and plot the location on google map. My question is, is this approach scalable?
Is there some Google API that allows real-time location sharing out of the box? I tried searching for it but couldn't find anything like that. Does something like that exist?
Yes, you can use Firebase realtime database for sharing the location.
No, there is no such thing as far as I know.
You may use the Google Places API for Android. For example, if you wanted to get a latitude/longitude based on a user inputted address, you could use the Autocomplete service:
https://developers.google.com/places/android-api/autocomplete
I don't think you will have the scalability issue you imagine, because the strain for finding coordinates would be on a Google server, not yours, as well as the mobile device of your users. You would only need to worry about storing coordinates in a central database somewhere.

Sending Coordinates to Google App engine

I am working on an android side project where I have set up my website on google Cloud platform, I am also using Google App engine and setup my database on Google Datastore.
My website consists of a map where I can create fences and send the coordinates of the fences to the app. I have maps activity on my android app and I am trying to figure out how to send the GPS location / coordinates of the mobile to the server every few mins.
So that the I can be able to see the location of the mobile on my website map. It is basically how to track a user. Can anyone please let me know if there is a way to do this? Thanks.
You have two options here that are independent of the underlying architecture you are using currently:
Polling
Sending Broadcast
In the first strategy the server (Google App Engine) shall poll the mobile devices at specific time interval. You can find the code for that easily online in the choice of your language. This would fetch the location of the mobile devices which you can store in the datastore and display on the map of your website.
In the second strategy you can put the sendBroadcast() code/method in your android code. This would enable the device to send the location to the server and you can store them in the datastore and display them on the map.
Hope this Helps!!

Android Google Maps API V2: Exchange location information between 2 users who have same app

I am currently working on an android application for my class. Our app is to help friends find each other. However for us to do so we need to exchange location data between those 2 users.
I want to know if there is a way for android to send/receive location data to another user with the same app, without having to use an intermediary server.
No there is not, you have to have a server implementation in order for the user to store their location and be able to pull down their friends locations.
However, you might be able to set this up pretty simply with a service like Parse. They make it easy to store data for your app without having to build your own back end.
I'm doing similar application. And you need a intermediary server. You must send the coordinates from the mobile to server. And then you must access from the other cell to server (using a webservice), and download coordinates.

How can I verify / trust the location of an iOS or Android device from the server?

I am writing the server to back a location-based app for iOS and Android. The app requires that we verify both the identity of the user and their location. I know how to do the former, but not the latter.
Is it possible to verify that the lat/lon the client is sending me is in fact the device's best estimate of the its current location? I'm worried about a malicious client spoofing a location and gaming the system.
CLARIFICATION: I would like to know how a server can trust, through some kind of verification process, the locations it is sent.
I can figure out how to get the user's location from the device. For example, on the Android platform my app would register to receive android.location.Locations, pull out the lat/lon, and send it to the server.
But how do I convince the server that I didn't just make it up? From the server's perspective, why should it believe, when given a lat/lon, that the user is actually there (or close to there given the accuracy)?
Perhaps there's some way of signing the data?
How do the servers for apps like foursquare and Facebook verify that the location data they're being given isn't being faked?
Write your own android or iOS client. As I am working on android it is very simple code. You need to write one service which runs on given period of time. This service will fetch the location. By this you will be sure that what ever lat/long you are receiving is only by your code. Now next point is accuracy. You can use criteria class in android. You can define your own criteria for fetching location.
Write service in Android and iOS that post the current lat/long periodicaly to the server.
And Also write code that fetch the lat/long periodicaly from the server and manipulate it to the Android or IOS map.
Enjoy. :))
From what I can tell, I don't believe it's possible to detect location spoofing on iOS when done using Xcode and GPX files to simulate location. All apps, even the iOS Map's app will believe your location is whatever it is set in the GPX file used to simulate your location via Xcode.
More info on this method: http://www.neglectedpotential.com/2013/04/spoofing-location-services-in-ios/

Tracking a mobile number using GPS

I am trying to develop an application in android using eclipse .
This application is like finding the friend location and directions using android mobile .
Now my idea to do this is in three steps :
1. tracing the mobile number of friend if he is having the GPS connectivity .
2. then putting that location(latitude, longitude) in Google maps with your location .
3. Google maps gives us the directions and this way we get it (using Google Map key ).
2nd and 3rd steps are done but the I am not able to figure out how to do the 1st part .
Sudhanshu
The user that you want to track needs to install and run an application, that regularly posts the GPS coordinates to your server.
There is no direct support for Step 1, due to obvious reasons.
I would suggest that you use a more legitimate way, by using the Google Latitude api.
tracing the mobile number of friend if he is having the GPS connectivity
IMHO the easiest and best way is to
generate a uniqueID per install.
read the location of that user at some regular interval
and posting the GPS coordinates to your server from the client application.

Categories

Resources