Can we track the user location without internet in IOS? - ios7

Actually i build the travel app which helps to track the user location but if there is no internet how can i store the location ?is there any trick to findout the location with GSM ?

Yes It is very much possible but gets useless to you.
You can get the approximate (lati & longi) position(if operator allows, I dont think they do) but what would you do because It wouldn't be possible to communicate back to traveler/user. At most you can do is send user SMS.
Mobile network is consisting of up of a number of adjacent radio cells, each of which is characterized by an identifier made up of four data items:
Cell ID
LAC, or Local Area Code
MCC, an acronym for Mobile Country Code
MNC, or Mobile Network Code, which obviously identifies the phone company itself
For this reason, once a cell name and coordinates(latitude and longitude) are known, and considering the maximum distance allowed between this cell and a phone before the phone connects to a new cell, it is possible to find out, approximately, the most distant position of the phone itself.

Its not possible to use GSM.GSM service providers can get the location details but they don't share those data to public.

Related

How can I determine the IANA timezone of a specific location

Is there a (free) webservice where I can a) give it an address (either full or city, state/province and zip), and b) get the IANA timezone of that address?
Use case: I have a form where a user manages clinics. Each clinic has an address. I want to preselect that IANA timezone of that address, so that I can adjust appointment date/times associated with that clinic.
I know that the Google Maps API and Bing Maps API can give me the lat/long of an address, and that there are other services that can give me the IANA TZ based on the lat/long. That said, those api's require subscriptions and keys and contracts, and it would also require a two request approach to get the single piece of data.
Address geolocation is a hard problem. It requires deep understanding of address systems and reacting to ever-changing, real-world, messy scenarios.
For example, you could get a database of the Zip codes of the United States and their approximate locations, but it would only be a snapshot. You'd find over time that new Zip codes would be added and missing from your data, and that existing Zip codes had been expanded to include other areas. You'd also find many Zip codes that are "non-locatable", such as those used to send mail to military overseas. You could even find a single Zip code that has addresses in two different time zones.
Take international concerns into effect and you'll find all sorts of edge cases. Every country and territory has their own special rules and situations.
It is a problem worth paying a service provider for. Trying to do geolocation in an offline manner might be possible, but it isn't advised.
The second part - figuring out which time zone goes to a location, is also messy. However it's slightly easier to coordinate. The Time Zone Boundary Builder is the main open-source project that attempts this. Most libraries referenced here use that data. But even then, it has updates and relies on borders established by Open Street Map data. Some of those borders are in dispute, so a service from Google, Microsoft, or others could give different results because they have map data with different borders. If you care about such things then you might want to test some edge cases against the different providers to see if you're satisfied with the results. You may find that the TZBB data works well, or you might prefer one of the online solutions.

Agora.io UE4 Blueprint connected more than two people

Good afternoon. I am using Agora - UE4 Bluprint version.
I can not find a way to access the frame of the new connected user. This is provided that more than two people are connected. The first connected each tick causes "OnLocalFrameReceivedDelegate"
all subsequent connected call "OnRemoteFrameReceivedDelegate". In total, it turns out that you can broadcast the image from the camera of the first connected or the second. And how to take the camera of all subsequent connected?
In our blueprint example, we have two images that receive Agora video frames:
CameraFrame - the Local user
InterlocutorFrame - the Remote user
If you call into the blueprint example with 3 or more people, you will see that you can switch between UIDs in the dropdown menu.
Switching UIDs changes the InterlocutorFrame video feed to the remote user whose UID matches the one you specify, like so:
To display multiple users, you need to place multiple UI Images on the screen, and SetBrushFromTexture with the appropriate UID.
I would suggest using the OnUserJoined callback to create a new image actor, and store the new incoming UID inside that actor. You could also store all the current UIDs in one place, or use another solution that you think is best :)

Calculate actual distance between two points using Google Directions API

In my iphone application i am creating a route between two points and using the google directions api to show the html instructions, step distance for each turn in text format.
When using the Directions API i had observed that when the user moves from location A to location D and there is a turn at location B, then the user is notified regarding the turn (i.e in the step of the json response from the direction api ) at point A' (consider A' between A and B). Now the distance of this step should be till location B, but i had found that it is till location B' (which appears after B), now again if i have a turn at location C
then the start location of step should start from location B, instead it starts from B'.
So my question is how would the user know the actual length of the step. Kindly help.
Thanks in advance
This doesn't really answer your question, but I thought I should mention it anyway.
Once iOS 6 rolls out in a few months, you won't be able to use Google's services to do this. Not for any technical reason, but in their TOS, they explicitly state that if you use their mapping services, they must be used in conjunction with their maps. Since Apple is using a different map provider come iOS 6, you would be in violation of their terms.
I had solved the issue related to calculate the actual length of the step.
Actually i was simulating the current location by taking fake locations and testing it.
In live mode (i.e while testing the application on the road) it works perfectly fine.

Custom iOS address book. Need advices about data structures and performance

I am currently developing a voIP app and I am really stuck with the address book.
Because of the custom design, the native address book does not fit in my app. Besides, I want to add some extra data not present in the native address book. But this is leading into some problems which I've separated into two sections:
1. Data structures:
In a section of my app I need to show to the user all his address book contacts with additional information (if the user has the same app and it's online, for example).
Right now I'm getting all the info from the Address Book api and loading it in an array directly (which is accessed by the tableView:cellForRowAtIndexPath:), but not displaying the custom information I was talking about. I don't know if its worthwhile to store all the address book info in a sqlite data base (where I'd be able to add the extra information easily) or if I should store only that extra information in a file or something.
The biggest problem of storing it in a data base is that the contact's picture is heavy enough to get a wasting-memory data base. I thought to store only a reference (the ABRecordID) and then to gather the related info from the address book instead of the data base, but the Apple documentation of the Address Book api says the ABRecordID is not guaranteed to remain the same, so it could cause my data to appear next to wrong contact data.
Any idea?
2. Performance:
The second big problem with this custom address book is that... the iOS table views are too 'manual' compared to the Android ones, for example. You need to have the data stored somewhere so that when the tableView:cellForRowAtIndexPath: method gets called you return that data. You can also load that data inside this method, but this makes it very slow.
The problem here is that preloading all the data in memory is dangerous, because a person may have 40 contacts or 2000 (and maybe he/she has taken a picture for each of them, which will be much more memory-consuming). If the iOS device runs out of memory the system will kill the app. The data base approach has no memory problems, but making queries for each cell to appear is so slow that it becomes unacceptable.
Again, I need ideas for this. Can't find a tradeoff between performance and memory consumption.
Please, don't ask for code because I'm not allowed to post it. I'd really appreciate your advices. Thank you in advance!
Data structures:
Along with the recordref you should store the name phone number and email address. Nothing else in your data store. If one of the three vales change and the other two remain the same update the changed value. The recordref can change during a restore of a device for many users at once but the name email and phone won't. If the user changes a name or email or phone they won do it across many users at once. Once in a while you end up with a recordref that does not match up with email and phone say, the contact may have changed employers so then show a list of close matches and ask the user to select one.
As far as some one having 1000s of contact I would use paging. Load 100 or 200 at a time in to an array with current row displayed in the table view as middle of your array index. Once the user scrolls 20-30 records update the records in your array from address book. Your going to be spending a lot time resaving data just to go through the collection comparing and trying to keep it up to date. You should be able to store quite a few records long as your not keeping the user images in memory, for that you should let the table view handle it. Get image and assign to cell when you get the notification about the cell about to become visible. Even then I would put a short wait before loading the image, because if the user is scrolling fast the cell will just fly by and you'll get notified that the cell scrolled out and you can release the image data. If the user is scrolling slowly then the short wait/sleep will pass and the image should show up for each cell.
I don't know how much meta your planning on storing in your app wrapping the contacts but if you should create two tables for the contact object, one with 3-4 indexed columns that will allow for faster querying and a second to hold the rest that loaded only when users viewing the contact in a detail view. Can't get too much into a tableviescell, unless your on the iPad.
Hope that helps.

iOS 5 Region Monitoring: Can new regions be created based on users current coordinates from coreLocation?

My question is regarding the creation of regions for regionMonitoring in iOS 5. Can new regions be created based on user of the app's current location? Or do all regions need to be predefined by the developer in the applications binary?
I know you can have certain regions register based on the users current location, because the os puts a limit on the number of regions that the phone/app can be monitoring at one time, and you should only register the regions within close proximity to the users current location... but can a region (previously undefined) be created on the fly based on the users location?
use case example:
users app spins up coreLocation to get an accurate set of coordinates, once we have accurate coords, corelocation shuts down to save battery. An event needs to occur when the user leaves the area so we want to know when the user moves x units of distance. Can a region be created x units of distance around this users current location, so we can start monitoring for did exit region?
I put in a good amount of research but could not find an answer... and unfortunately I am not very familiar with regionMonitoring.
Thanks :)
Theoretically, You can monitor any region any time, these regions don't need to be predefined, you may use following code to create and monitor your required regions pragmatically,
CLLocationCoordinate2D center = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude);
CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:center radius:50.0f identifier:identifier];
[self.locationManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest];
PS: Region monitoring implementation is not as much useful as apple advertise, to my understanding it relies on cell change events (again to save the battery). I'm not happy even with the results of default Reminders app (location based reminders) both on iPhone 4 and 4s.