how to find location using wifi in iphone - iphone

In my app, I am trying to figure out the location of my app user using WiFi (not GPS because my main area is inside the buildings), can any one please tell me how can I get user location using hotspot of WiFi.
Any basic guide or example is good .
Thanks in advance.
egards

Use Core Location. The Core Location framework hides the actual device capability from you (more or less) and (depending on the options you set) give you a best estimate for latitude and longitude. I've used the exact same app on an iPhone and iPod touch and have gotten pretty good results with the touch. It won't be as accurate, but it's good enough for most applications.
Check out the Core Location documentation and the "LocateMe" sample code from the developer site: https://developer.apple.com/library/ios/#samplecode/LocateMe/Introduction/Intro.html

Unless you mean to figure out the location of your user in a specific building with known Wi-Fi spots, you'll have to resort to using a IP address geolocation database. There are services, such as that provided by MaxMind, that have a database which you subscribe to for updates. The database maps IP addresses to locations.
This will only get you approximations, so your best bet is to use GPS primarily but IP address as a backup.

Related

bing maps over 3G/4G vs wifi

I have been trying to use bing maps API's function getCurrentPosition from a mobile device via 3G internet. I was expecting the Samsung SIII, being a high spec device, to work without any problems.
However when the mobile connects over WiFi I am able to get my location whereas when I switch the connection to 3G I do not get my actual location.
The pushpin does point to my house but as I move away from it, it does not react to my position. It's like getting the location of the server hosting the function (which is my computer at my house).
The GPS is on and correctly set on the mobile too.
Moreover, the getCurrentPosition is inside a recursive loop which invokes it every 500ms.
Now I know for sure that bing maps API works mobile devices since I have been involved in a Vodafone organized treasure hunt using tablets. Please guide me to solve my issue.
Thanks,
Justin
The positioning service is directly related to the device and its own implementation to find the position assumed by and from the various method that was used to find the best matching. It does not seem to be directly related to Bing API in this specific case.
In order to improve positioning speed and precision, the different systems can switch to Wifi-Positioning to other method like A-GPS or even cell identification.
If you try to get the information about your position based on your wifi, on Android, we can easily assume that it will used the Wifi-cell as the position that means that the known location would be the one retrieve from various crowdsourced information from your own devices and also others. That said, in WiFi, you will not be moving, you are connected to the Wifi cell without any other information.
If you cannot get your position in 3G, try to go outside so it can use the most precise positioning method (A-GPS) as it appears that phone cell-id is not working in your area.

iOS GPS Location without carrier service neither wifi connection

specifically this question is for iPhone only, basically the question is - does iOS location service still give the geo-location (lat, long) when the device has no carrier service neither wifi connection?
Yes it will give you the location using GPS and if the GPS signal is not there it still gives you the old cached location. So in any case it will give you the location.
So far as I know, the latest models (since 3? I think?) have an actual GPS so as long as you can "see" open sky it will be getting lat/long. Whether or not the related apps are able to function (whether it can load the maps, for instance) is another matter entirely.

Get location of iPhone via GPS/IP

Im working on a application for which I need to decide in which country the user is. Which is the most accurate way to do this?
Should I use GPS or IP-adress?
What would be the pros/cons with each method?
I would use Apple's location services, which use several technologies (cell towers, WiFi hotspots, GPS, etc.) to determine their location. You can then find the country quite easily with a lookup of the GPS coordinates. I think this would be more accurate than by-IP lookups.
Its probably easier if you go via ip address and use a geo ip lookup service.
For GPS the GPS unit needs to be turned on. I guess lots of people disable it for energy saving. If you just turn on GPS for your check the user needs to get a gps fix first which can be time consuming as well.

is internet or cell connection required for iPhone to use Skyhook to locate via wifi?

As I understand it when gps or cellular location services are unavailable the iPhone will use Skyhook to locate the device using surrounding wifi networks based on the networks locations that are stored in a Skyhook database.
If the device has no network connection, meaning it can't get at the internet at all, and it has no cell connection so no phone capabilities, can it still find the current location based on surrounding networks?
No, Skyhook is a web service. Your phone does not contain a copy of Skyhook's massive database of the geographic coordinates of every known wireless point in the world.
actually, the answer is not completely correct.
skyhook does utilize web services as part of its system, but it has client side software and a localized subset of the master data cached on the device. so while you don't need to be connected at any specific point and time, if you have been connected recently and in that local area then skyhook has loaded some data on your device and it may well be able to locate you without being connected.
see http://www.skyhookwireless.com/devices/deploymentmodels.php
that said, most apps DO need a connection to render location based content (like maps) so even if you are getting a lat/long calculated by skyhook, the app itself may not be able to render it.

How to implement indoor navigation on the iPhone

I would like to locate the iPhone in a building to build an application with similar features as the iPhone app of the American Museum of Natural History. There is no good GPS reception as there are also rooms in the cellar I would like to cover.
What can save me is that there is good wifi coverage in the whole area, so my idea was to triangulate the position based on the wifi base stations in range, whose positions are known. However I found no public API to find out which base stations are in range.
Questions
Do you have an idea how the app mentioned above manages to get the correct location indoors?
Could one add the wifi base stations manually to Apple's database and use the usual CoreLocation?
Do you have other ideas how to implement it?
Any help is very much appreciated!
Boundary conditions
The indoor navigation is only used during an event to guide guests new to the building, so no complex infrastructure should be installed.
There are approximately 14-18 rooms to be covered. They are in different parts of the building, so wiring everything up would be very costly.
The preferred solution would not require a server backend of any kind and would work with a list of wifi access points and their corresponding locations.
I wouldn't know about 1 and 2. But if you would implement such a thing, turn it around to save a lot of trouble: create your own free-of-charge wifi network, and let the network determine the location, either based on triangulation, or just based on the currently associated access point. Make their signal weak so you have one audible access point per room. Let the app ask a server in what room he appears to be. This will also work for any other mobile/pda/laptop.
As for other ideas: You could use bluetooth to do somewhat the same as you're planning for wifi. You can't do everything with bluetooth, but listing devices seems to be one possibility. So just put a bluetooth device in every room. Bluetooth range is limited by definition.
Another one would be to use the microphone in conjunction with a high pitched sound which identifies the room, but that would cause trouble with dogs (for blind people), attract bats, and repel mice at the same time. Better focus on an RF based solution ;-)
You can also check out Navizon's indoor positioning system:
http://www.navizon.com/product-navizon-indoor-triangulation-system
Their system is able to locate iPhones by using the WiFi signals transmitted by the device and doesn't require an app to run on the phone to locate it. It can locate any other WiFi enabled device for that matter.
Check out wirelesswerx.com They seem to be doing indoor location using Bluetooth and it looks like they can do permanent install or temporary for events.