I am wondering if there is some way to find people that are near you using data supplied by the Core Location Framework. If you can get the other person's CLLocation's description attribute, I assume there must be some way to compare this in terms of location to your location.
Thanks for any help.
Core Location can only gather location data from the device it is running on, so it won't be able to get location information from other devices. Instead you want to implement some centralized server to handle the location data of all devices using an app, and let individual devices talk to the server for this information.
Related
I want to find iPhone devices/device tokens within a specific radius from particular location.
For example : Within a 25 K.M. of radius from Sydney,i want to get iPhone devices tokens.
I am working on ASP.NET MVC2 for this.
Let me know,if is there any API for that?
Thanks,
You are only able to get details for devices that you 'know' about. Your app will need to log unique IDs for each device, and your app will need to log known locations for devices. It's then up to you to look up, from your central database, the details of the devices within a certain distance. iPhones can update significant location changes when running in the background but it's up to you to track devices and accept the limitations that that data may not always be correct. eg. If a user falls outside connectivity then you will still have an old location logged for that user.
I'm not aware of a single API that offers this services, if you're coding it then in your app you will need to register devices identifiers and location information to a central server. You will also need to create the lookup to query your data to find devices within a location. I am guessing that you might want to send push notifications, in which case your app will also need to register for notification services too.
There is no way for you to discover devices that don't have your app running and you also do not know who the owner is.
It used to be easy to get your historic location data from a file called consolidated.db on an iPhone (see, for example, http://petewarden.github.com/iPhoneTracker/). However, this is more difficult on new iOS systems. Is your data still somewhere on your phone, though, and is it possible to access it?
To be clear, I'm not looking to use the location API; rather, I'd like my historic location data as an end-user of my device. Are there any scripts/apps available that can do this for me?
This doesn't really answer my own question (I'm still interested in iPhone historical location data, so please answer if you have any ideas!), but there are apps that will allow you to store your location data:
OpenPaths, http://openpaths.cc/, which seems to provide the most control and a good policy about how they handle your data (I've not used it before, but if anyone has any insights, they're certainly welcome.
Google Latitude, http://www.google.com/latitude, which allows you to export 30 days of location data in KML format.
Both of these exist for both iOS and Android.
I'm fairly certain that this isn't possible but I thought I'd ask. The iPhone gets its location with Assisted GPS by means of giving the receiver the locations of the GPS satellites via the provider's data network but it still does processing to calculate your location. I'm interested in actually looking at the log data from the receiver in the phone. I'd really like to look at the carrier phase / doppler / C/No.. etc (or even the satellite ephemeris as it comes across the network). Is there any possible way to access that sort of thing or is it basically a private thing hidden from the rest of us?
All this is hidden from you, the system determines which location technique it uses depending on the accuracy you ask the location manager and the services available so as to optimize battery use and protect private user data (the user will have to confirm that your app is allowed to access location before you can get it).
This is everything you have access to without Jailbreaking.
http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CoreLocation_Framework/_index.html#//apple_ref/doc/uid/TP40007123
I want to build an iPhone App that should contact a server that is nearest to its location.
The app itself knows where the servers are located and it should find out which one to choose.
Because I expect many users with an iPod touch I can't use GPS to do this.
On StackOverflow and ServerFault I found this possible solutions:
Use Anycast technology to route users => I can't use this method because the device itself should route the requests and know where they are going.
Get country code and use the Google Directions API to determinate which server is nearest.
Get location by IP (GeoDNS etc.) and do the same (see above).
Method 2 seems good but I have three questions to that:
The API sends me the whole route from point x to point z. I just want to have distance. Is there a way to do that?
Google says they have a usage limit of 2,500 request per day. How do they control that? By IP? I ask this because they say you don't have to use an API key - how do they control then?
Is is a good idea to use Google without having any trouble later? My app itself will be free but I'll have In-App Purchases in it. Does that matter?
I hope somebody has experience in this. Thanks in advance!
Paul
In many cases, iOS will still return a location when requested on devices without GPS. Remember, the first generation iPhone didn't have GPS, but could still do location based services. iOS will use a number of techniques (IP geolocation, skyhook, etc) to find the location of a user, in addition to GPS.
Anyway, to answer some of your questions:
The 2,500 requests per day is per end user, or typically per IP address. So you shouldn't need to worry about getting capped. You should however be aware that you need to display a Google Map to use the API, so if you're using their API and not using a mapView you may have an issue.
I'm not entirely sure why you would need to use the Google directions API in the first place. If you can get lat/lon coordinates of both the user's current location and your servers you can just use iOS's built-in CoreLocation methods to get the distance between them, and decide accordingly ([CLLocation getDistanceFromLocation]).
I am trying to find the location of user using corelocation framework in my app ,
but
it doesn't showing good results , can anyone please tell me how can i get location accurately in indoors ?
thanks in advance
regards
I am not sure, about the exact physical environment but if wifi access points are available then you can use sdk available from skyhook wireless or navision to locate your current position in case the accuracy of the gps position is not good.
This is not a failsafe approach, but may work better in areas where data is available about wireless ap.
In the general case, you can't get an accurate location indoors using Core Location. (What's wrong with your question is in assuming that you can, before asking how to do the impossible.)
You might get lucky if you are under to a tent roof that is paper thin or near a large window below lots of wide open sky, or happen to be between 3 or more nearby wifi access points whose locations are all accurately and precisely registered with whichever wifi database(s) Apple is using.