Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to make an application, that will tell me about user location, for example i need to know when user entered the office and when he exit.
I tried geofencing with regions, but in my case it is not reliable, i dont have much experience with beacons this is why i dont know how reliable are they, also i would't place a gps locator on the user. I only want to know when he is in on his working place.
FYI not related to controlling people, only to check availability.
I would like to ask you for if there is better or an alternative solution on how to do this.
P.S: iOS app
P.P.S: i would like to know more about this, not a ready to go solution (thought it will also be nice :D)
I've been working a bit with iBeacons (it was a year ago though) and their reliability depends on the brand. An iBeacon has an UUID which you need to add to your app in order for you to listen to the correct iBeacon. Furthermore the iBeacon sends its signal using bluetooth so you need to have bluetooth running on the device with the app doing the listening.
Basically if you want to know when a user enters a room you'll need to set up an iBeacon in the room which sends a signal that the user entering the room catches using your app, and where your app in turn sends some kind of callback to a backend (or however you want to send the information).
You wrote that you want to know when a user enters/leaves his/hers workspace, and to do this with iBeacons the user either needs a unique iBeacon which sends a signal to your app, or the user needs to have your app which catches a signal from an iBeacon placed in the workspace. Furthermore the reliability in the precision of iBeacons are very bad, if there is a wall between the iBeacon and the app searching the signal the distance can easily give a faulty precision of 20m.
It doesn't sound like iBeacons are the way to go. You could of course place iBeacons around, for example, an office and have each user use your app. Your app in turn then listens on the different iBeacons and when it registers a beacon it sends data to a backend API telling that the user has entered the office.
Don't have a solution for you though, sorry :<
While the loaded term "spy" will certainly put off a lot of people, the basic idea here is a fairly common beacon use case. Tracking user location is perfectly fine provided that the user opts-in and knows what is going on.
The basic implementation is simple. Put one beacon with a location-specific identifier near each entrance. The app will monitor for detections of this beacon, and each time it is detected the app can record an event of that indicates the user entered or exited the workspace.
The main reliability problem with this approach is that the app cannot know whether each detection was an entry or an exit. A user could walk to the entrance then immediately leave. If the user did this twice separated by four hours, it would look identical to the system as a user arriving then leaving four hours later.
Solving the above problem means placing beacons throughout the building to provide near full coverage. This may not be practical.
Even with the above limitation, the technique can provide good enough data for some use cases.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to implement a mobile phone app that raises a flag if two users come close to each other in the physical world.
I'm looking for a solution that does not require the apps to be actively open on the users phone to be able to make this determination and raise the flag.
Is this possible? Perhaps by bluetooth, or perhaps by using GPS & time data uploaded from each phone and have server determine if the users were sufficiently close together?
I'm looking for accuracy within <20ft.
I don't think you can do this without OS support. Apple's Core Location framework lets you set up an iPhone to listen for iBeacons and wake up the phone and launch your app in the background if it detects one, but you can't make an iPhone broadcast an iBeacon signal when the phone is locked and your app is suspended. Apple can, but you can't.
I believe the underlying BLE framework that iBeacons are based on have the same restrictions.
Apple has worked with public health officials to do what you describe to track COVID19 exposure. You install the app on your phone and it uses BLE to both broadcast an ID and listen for other users running the app, and records other app users that it sees. If somebody comes down with COVID, there is a way to send notifications to everybody who was in close proximity to the infected person.
EDIT:
It likely would be possible to do this using recorded GPS data and a server, but it would be a battery, network, and computing hog. (I guess it would not meet your requirements since the app would have to be active in the background and the GPS would have to be powered up at all times.) The GPS takes a lot of power, and unless you were running the GPS constantly you'd miss encounters at your desired < 20ft proximity. If you did collect constant GPS data you'd have to upload it all and then do a BUNCH of batch processing to find proximity hits. You'd want to do a first pass where you use a crude computation with a fairly large distance threshold to throw away data where no other devices were anywhere near, and then a second pass on a dramatically smaller data-set. EVEN with that approach it would mean a LOT of number-crunching.
What is the best way to find users nearby?
I know it is easy to detect users when both people are running an app.
But how can I detect users of an app who have terminated it? Basically, one person would start the application and they should be able to detect other people who have downloaded the application nearby, even if the other people do not necessarily have that application open. Also, I want accuracy to about 50 meters, so something like significant changes would not work
Is there any way I can always run in the background so that other apps around could locate different users. This process could start again in the background once an app was terminated, like Core Location does.
I have heard of BLE or Core Bluetooth and was wondering if I could implement that somehow.
Maybe Mutlipeer connectivity too. Perhaps something with iBeacons
Constantly tracking users' gps location would be energy inefficient.
I have tried reading other answers to this topic but they seem outdated.
I want to make an app that can receive a signal from an external button without any cables involved.
For example, I've seen apps doing this with electronic door locks. When the door gets locked/unlocked the user gets notifed via the app.
In this case, I just want an external button, and when it's pressed the user gets notifed.
I'd love any tips on what I can use, thanks!
You probably want a Bluetooth Low Energy device that will be able to notify an app of an external change. There are many chipsets, such as the TI CC2540 family which can be used as a base. You'll then need an app that is able to discover this device, connect to it, discover its services and characteristics, ask for notifications, and act upon them.
However, your question is probably way too broad for anyone to provide a precise answer.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
experts and friends. I have a question regarding creating a server for iPhone app. I have had experiences with HTML, server-side stuffs such as using PHP, mySQL etc.
But making an App utilizing a server is something I have not experienced with.
The ideas is as follows:
1.) A simple server that sends out responses in JSON format (I have only had experiences with parsing in Objective-C but not generating from within a server).
2.) Enabling users to create a very simple account (profile name, password, a 50 x 50 px profile picture)
3.) It is just a fun / learning project between me and my other coworker. We were hoping to do, let's say, if I am driving to work and so does he, on the same route, we were hoping to be able to see each other's locations on google map and send each other /receive message each other a short message via the server.
And we were hoping to do all this server stuffs (preferably) within xCode and in Objective-C. There are many resources for server-side stuffs on the web for Java, Python, PHP etc, but not Objective-C. And we would love to be able to do all these in Objective-C.
I was hoping to get some advice regarding the technologies needed (ex: from hardware to software requirements to the structure / architecture of the set up)
from all of you. Sample code and description would also be helpful.
Note: we are knowledgeable on how server works (sending / receiving requests, etc) and have coded already in Objective-C.
Thanks in advance.
if I am driving to work and so does he, on the same route, we were hoping to be able to see each other's locations on google map and send each other /receive message each other a short message via the server.
Your IP address will likely often change, so if you want your server to be always available, it will have to periodically update some database in a fixed location (e.g. dynamic DNS resolver).
However, note that Apple makes it possible for your app to stay in the background and receive location updates, but does not allow you to accept incoming network connections in the background.
The correct way to send a message to a constantly moving iOS device is through Apple's push services, as in this case Apple takes care of maintaining connection with the device.
So the best way to implement your app is still to go with classic client-server architecture:
server in a fixed location
if you want to send a message to the device, server sends a push notification through Apple's server
your app registers to receive push notifications so it's able to display them anywhere.
As for location, depending on whether you want your friend to be able to see you at all times, or only with your permission, you can either
register your app to wake up when location changes significantly to notify server about its location OR
implement a push notification my friend wants to see your location! and give the user the ability to send or decline sending the location.
If you're not sure about implementing servers and push services, Apple makes it relatively easy, as you can buy $500 Mac mini and install $20 OS X Server to get some pre-implemented functionality.
I am looking on developing a tourist application for a city, where when the user is near to a "place of interest" he could get a push (local) on his device.
For example, I would add 100 POIs on my app, and a 100 messages for every POI to show when the user is in range, e.g. "You are close to the Cathedral of.."
Is this scenario possible? Is it possible to check the users position e.g. every 10 minutes even when the application is killed, and when in range fire a local push? How much battery would it drain? If the user closes the GPS would it try to use 3G/wifi signal to get the position?
If yes could you guide me the right way on what I should read on the subject maybe some tutorials and articles?
that's indeed possible. You could use the aforementioned technique outlined in this post. You can extend this with using CLLocationManager:: startMonitoringSignificantLocationChanges to restart the process of listening to locations after the app has been killed. Depending on your accuracy needs there are many other optimizations that can be done regarding battery life, like checking more frequently when a user speeds up etc.
I have developed a library that handles these details for you (for both Android and iOS). The download includes an example application that demonstrates how to use it. Feel free to check it out.
Yes,that is possible.you need to have some "places" (co-ordinates or addresses) stored on theapp locally. Proximity to a stored "place" can be checked by Reverse geocoder.
Check this Wonderful SO Question , very similar to yours
This might be too late for your question, but for anyone else that needs it. GeoFencing is a good option.
Here is a video explaining what geofencing is http://academy.pulsatehq.com/7-things-about-geofencing
And if you are using Ionic platform, here is the link to the plugin
https://github.com/cowbell/cordova-plugin-geofence
GeoFencing will solve exactly your problem. Just create a bunch of geofence located at these tourist sites and when user enters within certain radius of these locations, user will get a notification.
Good luck
When the app is killed, what exactly would be receiving the location updates?
When in the background though, you can set up location updates based on both proximity and time.
Check How do I get a background location update every n minutes in my iOS application?
As for GPS vs. 3g/wifi, the user has the ability to either allow location services for an app, or not. iOS will then handle whether GPS or cell signal will be used to determine position. Read about the significant-change location service here. Using the significant-change service will use more cell location than GPS lock to determine position, and vice-versa for the standard location service. Also look at location accuracy to learn more about conserving battery.