I'm not sure if this is the right place to ask my question but since I am not receiving the answer anywhere someone on this Q&A site might have had similar issues as mine and found a good solution.
My Android app needs to be notified if the user of the app is very close to certain places. I can calculate this information from GPS data but for detailed calculations, the GPS data is not enough. For example, the app needs to know if the user has left one room and entered another room.
Is there any solution available for my situation? I believe some sort of device might exist in the market that can notify any nearby Android device listening of its proximity to it.
Based on the example you give, no. Location, proximity and geo-fencing are all very different things. Location is "where am I now" - proximity includes "how far am I from object X" and geo-fencing is "am I within the bounds of a specified area"
Most location data is obtained either through GPS (geo-positioning) or based on facts like "the device is using the signal of a tower with a known location." So "proximity" data is usually based on the device using services that have known locations, not actual proximity based on distances to those devices such as signal strength.
Carriers have data regarding proximity to some extent, for keeping the device connected to the network, but I don't believe they share it. Even if they did, you need to integrate with carrier back-end systems and that's not "an app." Carriers can run traces to get locations, but they don't it regularly.
You could map known tower locations and get signal strength data, but then you need to triangulate to other known signal sources. In others words, knowing how far you are from a bluetooth device does not tell you which direction, so you would need at least 2 signal strength sources (and their relative locations and signal strength map) to determine location. GPS relies on signal strength to several satellites to triangulate device location.
There are not any "radar" devices that I am aware of, nor should you expect them soon. Usually "proximity to a known location" is good enough even for geo-fencing purposes (the device is "within a city" or "near a store"). This is very coarse geo-fencing and essentially doesn't help with the "device left one room and entered another" problem.
But that isn't to say that you couldn't create some kind of signal data for a specialized app in a controlled environment. For example, you may be able to setup devices so that you know the signal strength will be "very strong" for room specific signal sources when the device moves from one room to another. Or setting up bluetooth devices that measure their own signal strength compared to the device you are monitoring and then normalizing that data in some way to determine device proximity and triangulating device location.
A complicated problem that sounds simple... maybe one day it will be.
In general there is no API for that, however, if you could for example make your own "Finger print" of the location you might get it rather reliable. For example could for example scan wifi networks available in the excat spot with their signal strenght, and make your own logic for determining when the "fingerprint" is close enough to actual spot to raise the proximity alert.
You of course should first the have the GPS proximity to alert you when you are close enough to start the fingerprinting..
Related
In my application, we want to warn the user when he is at distance from Phone or watch.
We are scanning nearest nodes using APIs of wear OS.
Is there any way I can detect the distance between two such nodes?
Getting geolocation of both & calculate distance using formula is one possible way.
But aren't the APIs on wear OS has something which can detect distance using Bluetooth range or signal strength?
The best that's directly supported by the platform is the Node API's isNearby method, but that essentially just returns true iff the phone-watch connection is over Bluetooth rather than cellular or wifi. It doesn't give you anything resembling a real distance number.
Beyond that, you'd have to roll your own solution using GPS on both devices, as you mention. But that has a lot of downsides: complexity, reliability, and battery use are ones that immediately occur to me. Someday, you'll be able to get this kind of accuracy from the fused location provider using wifi, but probably not for some years.
The app which i'm writing need to somehow detect if an android device is indoors or outdoors. My goal is to detect if the user left a certain building as soon as possible.
I tried to use the user location signals. I'm not initiating any GPS sampling since I don't want to waste too much battery power, so the only way to detect if a user left a building is to wait for him to be far enough from the place and then use location signals which were sampled by wifi or cell.
The problem is that it takes quite some time for me to detect that the user left the building.
I know that when a user is indoors, his GPS signal is weaker. Can I somehow use the GPS status to find out if the user is indoors or outdoors? Will it be wasteful as initiating a GPS location sample?
Thanks.
I don't think you can do what you want to do with the FusedLocationProvider as this uses WiFi and cell tower triangulation. You will need to use the LocationManager.
It is also difficult to detect if you're inside and as far as I know there is no definitive way of doing this. You can make informed guesses however.
In terms of detecting a "weak" GPS signal you have a few things you could check:
The number of satellites available to you. If a low number then you are either indoors or somewhere with poor satellite coverage.
The horizontal accuracy of a received GPS location. If this value is high it can be deemed as poor accuracy which could be because you're inside.
No location has been received for a period of time. This could be because you're inside.
Have you thought of doing other checks as well as GPS so if they're connected to WiFi it increases the likelihood of them being inside?
I am looking for a way to transmit data when two phones are close by. This needs to be cross platform so I cannot use NFC or iBeacon. I plan on using allJoyn to send information. I would only like to send data to others that are within a few feet of me.
Is there any way that I could get an accurate reading of distance on other phones? Or can I get an accurate distance on a master device that could be placed in the room?
Shot in the dark answer:
If both devices are on the same wireless WiFi network (same subnet), then any devices on same network are "close enough".
When on the celluar network (or when only one device is on Wifi), use the Location APIs of the platform to get GPS coordinates. Send your coordinates up to a web server that keeps track of the Latitude/Longitude coordinates of each device. The web service also allows the devices to poll for nearby devices (where the distance equation can be computed on the server).
So the best way that I found to do this is to use the accelerometer to tell when two devices bump then I get the bluetooth signal strength of the nearest device, if that falls into a certain value then they are touching.
My intention is to track a mobile device with respect to another mobile device or wifi.
i am looking for some pointers to proceed on building a location tracking system something that does not depend in gps for location tracking instead.
A possible set of approaches might be.
user can click on "start" button on mobile which will be the origin and then start tracking the position w.r.t that origin tracking the direction changes.
A tracking system that depends on Wifi or another mobile device to locate itself
Is it possible for android device to know distance between them , if yes is it possible to know the direction as well?
I would like to get this done on android device , is this possible? i have given lot of search before posting this, so please help me.
Wifi localisation is possible with sensor fusion (still in research for better accuracy).
There are many papers available on this topic in net
http://www.cs.stanford.edu/people/dstavens/icra11/huang_etal_icra11.pdf
http://personal.stevens.edu/~ychen6/mobi248_liu.pdf
http://www.ri.cmu.edu/pub_files/2011/8/RobustIndoorLocalizationTech2011.pdf
Is it possible to create a GPS application using Google Maps to locate the position of items. To do this, I think that the process would be to attatch a GPS transmiting device to an item (such as car keys or sun glasses) and if you lose them, their position can be located.
I have developed some Android Cell Phone applications and would want to make the application to locate the devices for the cell phone market.
For this situation, what would be the best transmitting device to get?
When I misplace my sunglasses, keys, or something they usually end up somewhere out of a line of sight to the satellites ... Thus, even if these items had a GPS receiver they would not be able to get a fix.
Additionally those items need to be able to communicate their location to your device or the internet. And those items need a power source to operate the GPS (and the communication device).
In my opinion, for indoor lost item it would be better to use some signal form the items and then home in on the signal (bluetooth, wifi, whatever). This also needs less power than GPS.