In the "find my friends" ios app, a friend can ask for another person's location. Find my friends grabs the location in the background and the location services arrow appears momentarily. I am mainly concerned with the fact that the GPS arrow indicator is only shown when the user is pinged by a friend (does not remain on).
My intended scenario: Bob opens the app and pings his friend John for John's location. John's phone momentarily shows the GPS arrow and in the background, sends back his location to the server where we can send info back to Bob.
What is the basic strategy for accomplishing this? Is there some way to wake the app in the background to grab location?
I don't want to use something like significant location changes as I only want to grab user location when a specific action happens (a friend pings them).
Thanks so much!!
Even I am trying for the same solution but after loads of R&D I found that there is no way you can request a device to open up the app and send the location... apple used their own api to get the location of friend when request arrives.
You need to have a service running on the phone that can handle a request to get user location ans send it back.
Related
I've found that it's easy to obtain 'current location' of Facebook users based on what they manually enter in on their profile. However, I'm curious if a Facebook user logs into my app with their FB log-in, can I get their location data as they go from one place to the next? For example, my app recommends the user go to a certain location. I want to know if that user actually goes to that location. I don't need to know their location down to the minute, just periodically where they end up, maybe every half hour or hour.
No, this is not possible via the Graph API or SDK. You could track the GPS location via the device's sensor data if you're creating an own app for iOS or Android for example.
I keep reading conflicting things on doing this. I want to create an app that matches users based on location by sending their location to my server every x minutes to see if there are any other users nearby, but the users obviously won't have the app open all day and will not be able to see if there are any other users nearby unless they both have the app open in the foreground. For instance, if I open the app in the morning and then it goes to the background, my server will have my last location as wherever I was when I had the app in the foreground in the morning, but I want my server to know wherever the user is every x number of minutes and they would obviously consent to this kind of monitoring. Proximity would be very importance, hence the need for accurate and continual location updates.
Is this type of app even possible or would I have problems with the background post requests?
I was thinking that a simple solution might be to simply track all the data in the background and then submit all the coordinates that were collected in the background whenever the user brings it to the foreground, but this would not allow people to see other users that are nearby until the other users bring their apps to the foreground and submit where they've been as well.
Basically, if two people are in the same location, I'd like the person with the app in the foreground (person A) to be able to see the person with the app in the background (person B), even if person B hasn't had the app in the foreground for a while. I'm thinking this will require a timer and background location/network activity, but need to know how to go about it. Thanks
No, Its not possible. When you put your app in background your app will be in idel state. Hence you cannot track the location of the users who have kept the app in background. Maye be you can have some predefined location sets alrdy. So that when ever other users (A-Z) come across that location thet will notify the actual user.
Hello I was wondering if there are any methods that would allow me to interact with the iphone users. What I mean is like UIALERTVIEW of some sorts that will popup and update them with a status. But I don't want to have a fixed status, but one I can change anytime I want, like say if there is a day off, I want to provide a status over the air and when the user opens the app it will show the new message.
Is this even possible?
If there are any other alternatives please list them
The easiest solution would be that your app is contacting your website and downloads any message it should show on startup.
You can use Push Notifications to send users important updates automatically.
What you are looking for are called Push Notifications. They can put small numbers on your app's icon like the email app when you have new emails, or even show you popups when you need it. Start here: https://developer.apple.com/appstore/push-notifications/index.html
you can use Push notifications .. or build your own notification system by design a function fired when your application launching to contact your website and check if there any new notification .. then you present a pop , view whatever to show the notification.
I read more post regarding iPhone notification, and I have a simple question....
Where a device receive a notification (so I can display a message contains the message notificatio ti advise the user).
I understand that message is managed by the application.
The question is:
...when my application receive the notification is it possible to start it?
Or in other world the application became run when receive the notification or it simple became active only to manage the message and at the end of notification management the app return to sleep?
The main application windows is opened on the device ?
Many thanks in advance
Lukenukem
Ciao
With push notifications you can prompt the user to take action, which if they agree (by tapping the "open application" button), will open the application automatically.
The caveat is that you can't do this without the users consent. They have to tap the open application button for your app to open. There's no way to open the app automatically without the user's action, nor is there any way to open, perform the required actions and quit the app automatically.
The apps dont "sleep" they are either running or not (till 4.0 OS that is), im assuming you are asking about push notification, what happens when a user receives a notification is that they can choose to close it, or go ahead and "view" the notification which can cause the app to open automatically...thats as far is it goes in the current system i blive...
I have an app that ask for user's Location. Then user's location will be send to a server. Since the app that was run on first time on a iPhone will ask for permission, if a user rejects it, the app will keep on asking it on next time until it was allowed (AFAIK); but if the user allows the app to use the location twice, the app will not ask anymore for the user's location at the third time. Seems like it has been stored on preference.
My question was how I can keep my application to ask to permission for their Location every time they run my app.
Thanks.
There's no way to do this with the built-in API. You'll have to put up your own dialog and confirm it.