I'm attempting to create a simple single-page website that answers the following yes or no question: is a specific iPhone on land?
To explain further, I want to track the iPhone of my brother who works on a tugboat to find out if he's on the boat or on land. Is there a way of syncing to his iPhone's GPS data? Perhaps through "Find my iPhone" or a similar app?
Thanks for your help.
On iOS you can access the GPS coordinate of a device using CoreLocation, specifically CLLocationManager. You can poll it for updates and you get back a CLLocation object that has your latitude/longitude. There may be another step you need to perform after this to see if a GPS point is on land or not, which I'm not exactly sure the best way to approach.
Related
I guess this is a huge flaw in iOS .. like currently it's happening for PokemonGo currently the normal users are able to spoof device location to a desired one in non-jailbroken devices .. any idea or workaround to detect location simulation by Xcode ?
Using GPX location spoofing returns -1 for heading and speed - If your are looking for ways to detect spoofing, if the CLLocationManager is providing Lat,Lngs that are moving, but you're not receiving speed or heading, then the likelihood is the location is being spoofed.
How about using other sets of data to detect GPS spoofing?
Google includes it since 2007.
As an app developer, you could use the phone's internal inertia or orientation tracker data to check your GPS location's plausibility. The built-in compass may also prove useful. Using the phone's internal sensors only won't detect all cases, for example, if they are also spoofed consistently to the GPS signal, but it increases the effort one needs to invest to fool an app successfully. External sources, such as wifi-hotspot locations, would be even better but I think this is pretty much effort on the app developer's side, given that such data needs to be obtained and verified regularly by the application.
An extension on Kento's answer:
If, using accelerometer information, the phone appears to not be moving, request the user shake the device. You can keep a record of how it was shaken, and check if the previous shake was TOO similar. You would have to trial and error what the threshold would be, but I imagine it would be difficult to simulate several different shaking maneuvers.
I am working on an App, in which i need to track the device using my App. I have gone through the "Find my friends" App that Apple has offered themselves. But, it asks user's permission if he wants to allow tracking his location.
I studied, an app named "Uber", they clearly track the cabs maneuver around the city. They also show the user, how far is that cab from the user, the possibility that might be here is "Uber" dudes could be using external GPS device and may be interfacing them with the user's device. Since, If I am not wrong.. Apple does not allow tracking devices.
But yet, I am in need to implement that kind of functionality in my App. I was wondering if it is possible ? I am aware of location tracking, my concern here is live GPS tracking.
Please point me in right direction here, Any help with be truly appreciated
I have a full working sample that shows how to track android, iphone, windows phone and java me phones. It also has the server software to put the location data in a database and allows you to view the location in real time and also store the routes to view later. Its MIT licensed:
https://github.com/nickfox/GpsTracker/tree/master/phoneClients/android
I am looking on developing a tourist application for a city, where when the user is near to a "place of interest" he could get a push (local) on his device.
For example, I would add 100 POIs on my app, and a 100 messages for every POI to show when the user is in range, e.g. "You are close to the Cathedral of.."
Is this scenario possible? Is it possible to check the users position e.g. every 10 minutes even when the application is killed, and when in range fire a local push? How much battery would it drain? If the user closes the GPS would it try to use 3G/wifi signal to get the position?
If yes could you guide me the right way on what I should read on the subject maybe some tutorials and articles?
that's indeed possible. You could use the aforementioned technique outlined in this post. You can extend this with using CLLocationManager:: startMonitoringSignificantLocationChanges to restart the process of listening to locations after the app has been killed. Depending on your accuracy needs there are many other optimizations that can be done regarding battery life, like checking more frequently when a user speeds up etc.
I have developed a library that handles these details for you (for both Android and iOS). The download includes an example application that demonstrates how to use it. Feel free to check it out.
Yes,that is possible.you need to have some "places" (co-ordinates or addresses) stored on theapp locally. Proximity to a stored "place" can be checked by Reverse geocoder.
Check this Wonderful SO Question , very similar to yours
This might be too late for your question, but for anyone else that needs it. GeoFencing is a good option.
Here is a video explaining what geofencing is http://academy.pulsatehq.com/7-things-about-geofencing
And if you are using Ionic platform, here is the link to the plugin
https://github.com/cowbell/cordova-plugin-geofence
GeoFencing will solve exactly your problem. Just create a bunch of geofence located at these tourist sites and when user enters within certain radius of these locations, user will get a notification.
Good luck
When the app is killed, what exactly would be receiving the location updates?
When in the background though, you can set up location updates based on both proximity and time.
Check How do I get a background location update every n minutes in my iOS application?
As for GPS vs. 3g/wifi, the user has the ability to either allow location services for an app, or not. iOS will then handle whether GPS or cell signal will be used to determine position. Read about the significant-change location service here. Using the significant-change service will use more cell location than GPS lock to determine position, and vice-versa for the standard location service. Also look at location accuracy to learn more about conserving battery.
I'm trying to find out whether it's possible to get the current location of a Windows 8 device if it's not connected to the internet via Wi-Fi. I'm aiming this at Windows 8 tablets and I don't think they all support GPS. Does anyone know what would be the best way to go about this? Or is it possible at all? Little bit lost and bombarded with solutions that don't seem helpful for my situation.
Thanks in advance!
You can't.
If theres no internet connectivity and no GPS, there is simply no way to work out where on earth you are!
What I would suggest doing is:
1) Saving the location each time you do it and using a previous location and informing the user.
2) Not doing anything and instead asking the user to turn on their GPS.
But yes, I would still try to find out the location even if their isn't an internet connection, because some devices will have GPS onboard and enabled.
How would I go about figuring the position of someone inside (or outside) of a given area (such as a building) using assisted GPS with IOS app?
Is it possible to have it accurate enough withing a few feet?
Is this the right way to go about it?
Is it possible to utilize more than one wifi connection in the calculation?
Your app can use the Core Location framework to determine the device location. Core Location will use whatever hardware is at its disposal to determine the device location to the degree that you request. For example, some devices have WiFi but no GPS; others have WiFi, GPS, and cellular radios. Future devices may have other location technologies built in.
The point is that as an application programmer, you don't worry about that. Instead, you say: "give me a location that's accurate to 100 meters" or "let me know when the device has moved from the current spot by more than 10 meters" or "give me the location with the best accuracy you can manage."
Again, take a look at Apple's Core Location documentation to get a better idea of how it all works.
If you're looking to track a device with, say, 1-meter resolution inside a building, you're not likely to get that from Core Location. There's been research on triangulating position using known locations of WiFi transceivers, but nothing that's implemented in any commercial smart phone that I know of. I don't believe that iOS gives you easy access to the data you'd need to do this, so it's probably not a possibility. You could, however, go the other way: program several WiFi receivers around the building to listen for any nearby devices, use that information to triangulate the devices' positions, and then make that information available via some web service.