Retrieving phone geolocation when user tap NFC chip? - geolocation

I am developing a software to remotely manage NFC tags - change their actions and track campaign performance such as:
No. of taps on individual NFC chips
date and time of taps on individual NFC chips
location of NFC chips when tapped
When the user tap the NFC, they are directed to our server which then redirect the phone's browser to the designated destination set in the campaign.
I have completed all of the above except for the location one as it gives me the inaccurate location.
At the moment, I'm using the site http://ipinfodb.com + their API to get the phone ip address and supposedly location, but it's innacurate.
Another, more accurate approach would be to "get" the phone's location via the GPS but not sure how to approach this.
Any suggestions would be much appreciated.

Probably an easier solution would be to get the data out of an analytics backend such as Google Analytics (relying on their accuracy ...)
Otherwise you need to ask the user's permission - but that needs to be done on the web site acting as the redirection target, as otherwise you would break the flow.

Related

iOS Location Services visits and system Frequent Location

I noticed that Frequent Location on iPhone seems to use much less battery than an app monitoring iOS Visits (https://developer.apple.com/reference/corelocation/clvisit).
Frequent location on iPhone can be viewed on the phone via Settings -> Privacy -> Location Services -> System Services -> Frequent Locations.
I would like to know if Visit monitoring service from CLLocationManager is the same as iOS Frequent location or is it on different system used by Apple. If Apple is using the same service why it does not have any impact on the battery?
The two APIs are intended for different purposes.
CLLocationManager API
This API is designed to inform your application of location information based on requirements which are indicated by your app. You may choose some specific conditions when your app receives location data, and your app will continue to receive that data until it is no longer desired. Think for example, the Uber app would request location data when opening the app so you can schedule a ride, and would keep requesting it as your ride approaches.
Frequent Locations / CLVisit API
By contrast Frequent Locations is different in that it does not consistently report location data to your app. Instead apps can indicate they want to know if a user visited a specific location, and if the user does then iOS will inform the application. Locations tend to be somewhat rough. This would be used in the example of the StarBucks app, when you arrive near a StarBucks the app may tell you about the nearby shop with a limited time sale to encourage you to stop in. For many of these apps, the user will generally select a pre-defined list of locations which they will mark as their "favorite" locations/stores and the app will use that data to notify the user.
Battery Life
Due to the difference in how both of these APIs operate the difference in battery usage becomes apparent. With CLLocationManager we begin and continuously report either an accurate/rough location to the app. GPS is normally used here in addition to cellular triangulation and wifi hotspot location data.
But with CLVisit, we typically only notify the app a single time upon the initial visit (or departure) of a desired location. Due to this iOS doesn't need to wake the app and do any additional processing if the current location isn't roughly gotten closer or farther away from where we are interested in reporting. The device can get a rough location using cellular triangulation and wifi hotspot location data. GPS is not generally needed for this level of location detail. Since your cellular radio and wifi are usually "always on" it doesn't drain any additional power to use these two methods for location detection.
But how can it use cellular and wifi to determine where I am?
Explaining how your device derives it's location from cellular or wifi signals is beyond the scope of this question. But here is an excellent post explaining a little about how that information is derived. How does Google know where I am? - security.stackexchange.com

iOS get user's frequent locations or figure out user's home location

Is it possible to get access to the frequent locations recorded on iOS devices, I'm trying to figure out where the user's home is without using backgrounding services in my own app itself.
You may not access frequent locations already recorded on iPhone. The basic rule is whenever you want to learn something about a user, you had to obtain an explicit permission first. And that makes a perfect sense to me, as a user.
This rule is equally applicable to all the bits and pieces of personal info like photos, address book records and locations. You have to initiate visit monitoring from your app, and you will have to obtain a permission to always use location services to initiate this kind of monitoring.

iBeacons using a user's mobile to trigger a digital sign

I am trying to figure out a way to use iBeacons to trigger a physical Digital Screen. Has anyone done this or seen this?
What I would like to do is when a customer gets close to a digital screen an iBeacon would be triggered and would load to a digital tv screen an ad hosted on a website. I know you can do this to the phone screen, but can the trigger load content to digital signage? If so what would be needed? I already have an app that is triggering API calls. I assume we need some kind of computer hooked to the screen that receives the trigger and then displays content, but having a hard time wrapping my head around what is needed and have failed to see this anyplace.
Any help is appreciated.
There are a number of architectures that would support this. Below is a simple approach that I have prototyped before:
Make an electronic billboard display out of a computer or tablet that has:
Internet connectivity to refresh an ad from a remote web app.
A Web Browser that opens to the add display URL in the web app mentioned above.
Transmits as a beacon with a known identifier. You can make the tablet or computer send a beacon transmission with the onboard bluetooth interface, or you can simply plug in a USB bluetooth beacon to an open port.
Build a server-side app that does the following:
Has a number of configurable advertisements that display in a web browser.
Has a mapping of user identifiers to advertisements (basically the logic of what users are shown what ads)
Exposes a web service to register new mobile app installations that provide the user identifier, along with any user info (name, address, etc.) needed to target ads.
Exposes a web service to accept notifications of what nearby users have detected the beacon.
Automatically refreshes the advertisement to be targeted to whatever user is nearby, or some default otherwise.
Build a mobile app that:
Upon installation, calls the web service on the server-side app mentioned above to send the user info (name, address, etc.) needed to target advertisements.
Detects the beacon mentioned above using CoreLocation (iOS) or the Android Beacon Library (Android).
When the beacon is detected, calls the web service on server-side app with the user identifier to tell it that the user is nearby.

How to extract the user cell information from received message?

i am about to develop a location based service for simple mobile (a mobile have no GPS,or wifi) through sms. so to know the location of my user i want to know with which cell Id are they communicating. Therefore how can i extract their cell information from the message i received from them?
The SMS message does no contain any infomration of the sender's location, thus there is no ways you could extract that information from the received SMS message.
Anyway's there are Cellbased positioning APIs available on a device, so check the platform you are developing for, and see what APIs there are offered.
And then of course you can have the location sent over SMS to receiving end, but indeed it would mean that you have your application running in both ends.
In general Phone operators can offer location based services, in which they could locate devices which are using their network, but in general they usually don't let normal developer to access that kind of infomration.

Is it possible to track devices of users on our device

I am working on an App, in which i need to track the device using my App. I have gone through the "Find my friends" App that Apple has offered themselves. But, it asks user's permission if he wants to allow tracking his location.
I studied, an app named "Uber", they clearly track the cabs maneuver around the city. They also show the user, how far is that cab from the user, the possibility that might be here is "Uber" dudes could be using external GPS device and may be interfacing them with the user's device. Since, If I am not wrong.. Apple does not allow tracking devices.
But yet, I am in need to implement that kind of functionality in my App. I was wondering if it is possible ? I am aware of location tracking, my concern here is live GPS tracking.
Please point me in right direction here, Any help with be truly appreciated
I have a full working sample that shows how to track android, iphone, windows phone and java me phones. It also has the server software to put the location data in a database and allows you to view the location in real time and also store the routes to view later. Its MIT licensed:
https://github.com/nickfox/GpsTracker/tree/master/phoneClients/android

Resources