In a hurry I put a wrong location in my cloud Firestore setup. I am not allowed to change it. Currently I'm staying in Singapore but the location I have put is US. Can someone help me what should I do? What will happen if I continue with that location for my database.
Thanks
To reduce latency you should take a location near you or more precise your users. Unfortunately you can't change the location of a firestore database once selected. What you can do is to create a new one and set the location of that one near you and your users. Just don't forget to replicate that in you firebase configuration in your app.
Related
I am trying to develop an app that would show the location of multiple users near you on a map in real time. Me and my friend were thinking of getting the users location every 1 min, then upload their current location to a database, then update that on the map, and show it on other people's map. Now we realize that this would consume so much data and time from the user, also that would create so much calling to the database which we are trying to limit. So my question is, how would I show multiple users location on the map in real time? Think of uber or lyft and how they display the driver's location and also many other driver's location to the user. How did they accomplish that or if there is away of creating a similar thing without the strain on the user's data.
Steps to be followed -
Get location of the user not after every 1 minute or specific time but get location as per user moves. Get their location by using Significant-Change Location.
To get multiple users data - you must be storing data of other users, so get those data in background thread. Don't use main thread to get data but use main thread to display the data.
If you want store data into local database, so that if user is offline he does not looses any data.
PS: Start small scale then go for large scale. Don't think of handling data into large scale like uber at first. So start with 5 users and updating data into application every specific time( this is not for fetching user location but to showing data of users)
Is there any way to get location of the iPhone without demanding location services from the user? It should not be really accurate.
edit: I have no problem with implementation of location services. I try to find an alternative way
No this is not possible.
Apple has made location service abstract so you can't really see which technic is used. Thus if the user turns off the location service you can't get the location any other way.
There is however the option to check the user IP and get a very rough location.
I am developing the location based application. I just stop the location manager when user reaches the particular location(which is selected by user). I have tried in all combinations but no luck.Please help me on this.
Thanks in advance.
What you are looking for is called Geofencing.
It's built-in in CoreLocation and really easy to use.
Have a look at this tutorial.
I've been looking into the Foursquare API on iOS (through das-quadrat). I'd like to figure out if a user is at a specific location. I know how to find it and I can actually get it. That works.
How can I now tell if the user is actually close enough to the location to consider his close proximity as a check-in (I'm not interested in actually checking him in the Foursquare way)? It's just that I want to know that a user is at a venue of a category I'm monitoring. I know that I can just calculate the distance between the user's location and the venue's location and consider every distance less than, say, 15 meters a check-in but I was wondering if there's is a more elegant solution, maybe even an API endpoint that I'm just missing.
I would guess that the real time API is best suited: https://developer.foursquare.com/overview/realtime
Allows you to register for notifications, thus Foursquare does the heavy lifting for you.
was just wondering how i would basically go about finding the user's location and then displaying this in an un-editable UImapView. This would be used to location stamp photos and videos taken within the app and must still be displayed whilst the app is open.Just as a disclaimer i am not asking anyone to sit and write this code for me (but feel free to if you want) i was just hoping that someone else may have already done this and so might provide their code as a reference. thanks for any help you can provide
As rokjarc says, you need to break this into pieces.
The camera app that's built into iOS already has the option to save location data into your photos.
Are you saying that you want to be able embed location information in pictures that you take from within your app?
You have at least 3 different things you need to read about:
CLLocationManager. You would create an instance of the location manager and ask it to start updating your location. It takes a while to settle down, so you would want to start it when your app is launched. You'll want to fine-tune the settings so it only notifies you on fairly large location changes to conserve battery. The location manager is an async library, so you start it updating, then wait for it to notify you, and parse the location updates it gives you to make sure they are current/accurate enough.
Next, map kit. You would need to add an MKMapView to your app's views, and set it up to display to a window. you could either use the option that shows the user's location automatically, or use location manager information to change the map region and/or create a map annotation showing the user's current location.
Third, you will need to figure out how to save location metadata to the images you take. That's not something I've done, so I don't have any specific help for you.