Client And Server Architecture in Android - android

If i am using Location Listener interface in android to track locations in a project then will it be a client server architecture?As far as i know it tracks location by requesting the server and therefore Google play needs to be installed

while using LocationListner you are listening GPS device in your mobile through some classes/methods.Google play needs to be installed because if you want show location on map it needs playservices.You have to be clear getting location and showing it on map are two different things.If you are looking for
Android client server application

Related

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

Would it be possible to track another android device

I am working on building an application that tracks a GPS enabled android device. It is sort of a service to track local taxi network around my place.
now my question is Would it be possible to track another device through the android API, with the consent of the owner of the device?
I am using google maps API to display the map and markers.
EDIT:
To be precise, i would like to track the location and if possible the movement of another GPS enabled device from the user's phone. Lets say the User clicks on a button to know the nearest location of a taxi which is equipped with an android powered GPS device, the user should be given the location of that nearest taxi on his map.
I would like to equip the users to query the location of the taxi through my app.
So would this require a central server to which the GPS in the Taxis send their location information periodically and the user's device will query the server for the Taxi's location?
Or can this be achieved without a dedicated server and by using Google's location service to query the other device through my app?
I went through some docs in the Google play services but they seem to track the location of device which has installed the app rather than getting the location of another remote device.
with the details you have given ... I think one way to do it would to use some sort of cloud where you store the locations (in a database or anything that suits your app),, according to your description I feel you can split users of your app into two categories,
a>users b> taxis
you need to collect their locations periodically and update the data base
you should update the content ( location shown to user ) in app by getting data from data base periodically based on user location and with a predefined radius to show all taxis near users location
then refresh the relevant views based on the category of user, so that the users can see taxis near to them
suggestion: I would suggest you to use cloud server like Parse which makes it very easy to save locations and also provide a very efficient way to retrieve it with just few lines of code.. hope this helps
Update ::
As of my knowledge I think this cant be done without a server since you need some place where you can efficiently save the user data (locations etc) so that you can present the relevant details based on the data saved on server.
What I did and would advice you to this is, firstly my project was to make an uber like app but specifically for buses. My app tracks the location and movement of other Android devices by storing the current location on a realtime database like firebase. There are 2 apps, the user app and the bus app. The bus app sends and updates its current location on to a realtime online database every 50 milliseconds which is firebase. Then the user app retrieves the location from the database and sets a marker onto the map. I hope you understood and I got to help you

Share GPS location with no Server

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.

Building a web server app that tracks android phones using GPS

I have already android app that is capable of getting GPS data. Now I want the app to send the GPS co=ordinates to a web server. Say, I have an app with Google Map embedded, running on my desktop PC. Now I want this application to show the location on Google Map by obtaining the GPS data from the web server. Being an amateur, I don't know much about web APIs. So, could anyone direct me. I need a good start.
This one's seems similar Passing GPS coordinates from my iPhone to a web service and displaying the GPS coordinates on a Map
But I need to know the differences in Android platform
You could pass the lat/long to a web server and use google API to link it to maps - http://code.google.com/apis/maps/documentation/webservices/index.html
http://code.google.com/apis/maps/documentation/javascript/
or use HTML5 Geo-location then pass the lat/long onto maps again -
http://html5demos.com/geo

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/

Categories

Resources