So i'm working on an iOS application that was going to use GPS location data to determine if a user was within a certain radius of a building and allow them to check-in.. I know setting up geo fences is fairly easy...
however
Is it possible to only allow users to checkin once a wireless signal for a particular Wifi network is detected instead? I would like to do this because we are in a building that doesn’t get GPS reception and only gets triangulation from the cell towers – this is going to lead to quite a wide radius...
Any thoughts?
You could solve your case with checking SSID of the Wifi the user is currently connected to.
if (SSID_of_currently_connected_wifi == SSID_value_for_building_wifi)
{
//user can check-in.
}
You can get SSID of currently connected Wifi with SystemConfiguration framework. See: https://stackoverflow.com/a/5198968/1677480.
You cannot get a list of available/detected Wifi network without private API's. See: https://stackoverflow.com/a/9684945/1677480.
If you will choose "GPS location" solution you can help yourself with my answer (based on distance between 2 GPS locations) here: https://stackoverflow.com/a/22036318/1677480.
Related
I'm getting current location,
In my app I want to know my location is from GPS or WIFI or cellular data. How do I check that ?
Is there any way to determine location source ?
Apple iOS uses
Assisted Global Positioning System (A-GPS)
Crowdsourced Wi-Fi
Cellular network search
to determine your location:
These three stages are used in descending order of priority. In other words, iOS first attempts to fix your location by using a GPS satellite link. If it is unable to acquire a satellite, iOS fails over to Wi-Fi. If you are not connected to a Wi-Fi local area network (WLAN), then iOS uses cell tower data
Apple uses all the non-GPS systems simultaneously with GPS, as part of A-GPS. To say it's falling back is not really an accurate description. Rather, while trying to get a GPS lock, it will use the other systems to get a rough idea of your location. Only if no GPS lock can be obtained, will the phone simply report what it knows from the other sources.
CoreLocation does not provide its source (or sources), but you can use some heuristics to guess.
Check the accuracy reported with location updates. A large range (e.g. 500+ meters) would indicate it's not a GPS fix.
Check which radios are available. If there's no cellular radio in the device, fixes must come from Wifi.
Check if the cellular radio is active. The device does not need service with available providers to use towers for a fix. Don't filter on that.
Those are my best guesses. If you really want this feature, you'll have to experiment.
Does iOS support proximity based actions when detecting a specific Wi-Fi signal?
E.g. similarly to what happens with iBeacons is it possible to detect entering a Wi-Fi region?
I have found this article on Wi-Fi Aware which is interesting:
http://www.wi-fi.org/beacon/rolf-de-vegt/wi-fi-aware-a-platform-for-proximity-based-wi-fi-innovation
Unfortunately, iOS does not provide third party apps access to visible WiFi networks.
There are private APIs that some apps use to detect the name of the currently connected WiFi network, but that is of limited use because a user will not connect to every WiFi network when moving around. The CoreLocation component of the operating system itself does use visible WiFi networks to help infer it's latitude and longitude, but the mechanism is internal, closed source and not exposed to the user.
I wonder if any device has open it's wifi without connect any access point and is it give some data info for geolocation?
Is the question about positioning with WiFi hot-spots ? Basically its described pretty well in: http://en.wikipedia.org/wiki/Wi-Fi_positioning_system
So basically in it, to be ale to determine the location, you must know the positions of the WiFi hotspots beforehand, or at least have a service which has list of hotspots and which could give you the location for the WiFi's you can see.
You don't need to make any connection to the WiFi hotspots, but you simply use the identification they are giving, and passing that information to the part which is determining the position.
In general, you would need to see whether you can find a service you could use from your selected platform, or whether the platform has APIs for using the technology.
In general positioning APIs might use the WiFi information on their cell-based positioning, and on those cases, you wouldn't really need to know anything about the WiFi things in your app.
In advance I am sorry for my English.
The task consists in defining, whether there is a person in a certain place (at certain office, for example), and to activate depending on it certain possibilities of the appendix.
At first I thought of definition of information on WiFi (or check of the same SSID, or automatic connection to the hidden network with set in the SSID appendix and the password), but, seemingly, not to make it without jailbreak (if somebody knows how - please, answer).
I think, GPS - not the best exit as it is possible to be out of the room, using it.
By the way, I already saw apps determining by WiFi of a point of access so it can be made somehow. I guess.
Actually, question. How it is better to define in the application, whether there is a device within, for example, premises of office?
Basically, if you know location coordinates you can safely use CoreLocation framework. Whether your target device supports region monitoring it will be perfect. It uses not only GPS, but WiFi and GSM as well
Look here: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html
If you really need to get network name you can play with CNCopyCurrentNetworkInfo function of CaptiveNetwork framework.
See:
https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/Reference/reference.html
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.