We have already implemented beacon based real time campaigns, like setting some campaigns to some beacons and depending on the ranges we can fetch them and show it inside app as a popup. now my question is how to do the same thing using wifi?
Like: I have to monitor the wifi that associated in a particular area, then depending upon the monitored wifi I have to display the respective campaign associated with that.
Ex: I have 4 wifi networks in 1 building, all wifi is associated with one one campaign so total 4 campaigns are there, now my app should first monitor the nearest wifi and connect to that and get the respective campaign
Can anybody suggest how to achieve this?
Unlike iBeacons, currently its not possible to detect multiple wi-fi signals in your code.
Secondly, measuring wi-fi signal strength is not as straight forward.
Lastly, iBeacons are based on a bluetooth standard which provide a correlation between RSSI value (signal strength) and distance from the beacon, assuming you are using a standard beacon. This is not true for wi-fi as signal strength largely depends on the network hardware.
In spite of all these points, it is theoretically possible to create a controlled environment with specific wi-fi hardware which can allow you to know distance based on signal strength. But that is way too broad to be discussed in a SO question.
Related
Do all Cars that support Bluetooth also automiatically support iBeacon without any additional work?
I want to test if the user is currently I his/her car. According to this question, this is generally not possible but iBeacon may be a solution. Thus, my question is if iBeacon is always supported by a Car if it has Bluetooth or if special hardware is required.
No, not all Bluetooth enabled cars emit iBeacon transmissions. I can say this with certainty as my 2017 Mini Cooper pairs over Bluetooth yet does not emit an iBeacon transmission.
I also rent late model cars relatively frequently and am the developer of a number of beacon detector apps. While I have not explicitly tested all vehicles I have rented, I have never once noticed one triggering a detector app. My conclusion is that few if any vehicles emit iBeacon transmissions in general use.
I have worked with an insurance provider that provides beacons to be installed in customer cars (typically plugged in to a USB adapter) allowing vehicle usage tracking with the company app in exchange for a discount. An extra hardware solution like this would be required to accomplish your goal with iBeacon.
Not sure this is an alternative for you, but you could place a beacon in the car and have an app on your phone detect it and perform an action on that fact. Of course the app then would have to run also when the phone and the app are not actively used.
NFC could also be used this way, provided the phone is always placed in a holder.
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've been googling this problem, but haven't gotten the wording right.
Basically I'm looking for an API, or some seeds of guidance in how I would go about writing a program where you get push notified if someone is in the same area as you based on GPS coordinates. In short: a realtime 4square not based on checking-in but based on GPS.
Part of me feels like this is something Apple may frown upon, but if the user is notified and making the decision to run the app, perhaps not.
Thanks in advance.
You're looking for the Bluetooth Bonjour type notifications found in GameKit. This has nothing to do with GPS and is instead based of short range radio (Bluetooth) which advertises itself using a zero conf protocol. The APIs basically give you the ability to broadcast your service (eg. "MyGame") over bluetooth and listen for others potentially broadcasting the same service.
If you're talking about geographic vicinity, you'll need to set up a central server where each device can register its location, and which will provide locations of nearby devices. A service like FourSquare does exactly this kind of thing.
Another way to look at 'vicinity' is network vicinity. You could have each device advertise itself via Bonjour and look for other devices doing the same.
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.