How does this works. Triangulation to find a phone - android

The thing is a teacher of mine showed us an application that can show the location of a phone (within 1 - 2 km I think) just using the phone number, I asked him how was that possible and he said it uses triangulation to do that.
I'm just curious about it, it is really possible, I'm learning android programming and that sounds awesome, so I'm really interested in it. I really would like to know how it works.
I'm not a native English speaker. If you don't understand something you can ask me.

What you describe is not possible, except in specialized situations, such as:
The phone number in question is for some landline or other fixed-location phone, in some country where the location can be inferred from some digits of the number. For example, in the United States, you used to have a good idea where the phone was located based on area code and "exchange" (next three digits after the area code). In general, I would not expect this to give you "within 1 - 2 km" results, and it would not involve triangulation.
The user of the phone with the phone number is running some app on that phone that reports the phone's location to some server, and the app that your teacher ran is querying that server to find the location given a phone number. How the app on the user's phone determines its location would vary (GPS, cell tower triangulation, etc.). This approach has serious privacy implications, particularly if the user of the phone does not know that this app is publishing their location.
Your teacher has hacked into some system run by the mobile carrier, to query one of its servers that might have this location. If so, your teacher might get arrested, as this is illegal in some jurisdictions.
In general, it is not possible to find the location of a phone, given its number, for blindingly obvious privacy reasons.

Related

User Attendence app

Guys i have requirment and im confused. User's staffs have smart phones. Now he wants to develop an attendance app.
Requirment is when a staff mark his attendance via his mobile app he should
be presented in the office premise. we need to prevent his marking attendance when he is out of the office.
I was thinking about ibeacon. but its not feasible. i thought to check if staff connected office wifi. But User was telling staff can access the wifi even from the road. Is it possible to use gps Proximity for this kind of validation?
User is requesting to do a research if there is any other way to achieve this, only via the technologies reside in the phone.
ideas welcome. (please dont tell to use finger print. this a research. finger print is alternate solution.)
Few Solutions:
1] Store the co-ordinates of the office in and database. So when staff checks in for Attendance on the app. Locate its co-ordinates, match them, if same then enaaaaabe him to attend.
2] When app launches check for the location, if office then proceed further.
3] When staff punches in for attendance, launch a samera task to grab a selfie. See to that no gallery access. Tag the photo with time and location
One of the best solution is to use Mobile phone as a Beacon Broadcaster. It gives best solution. We need Bluetooth LTE Supporting devices for this.

Android: How reliable is getMacAddress() as unique identifier

Are there known bugs or issues with getConnectionInfo().getMacAddress() when it's used as a unique device identifier?
One of the alternatives, the Android ID, seems to be not available (or not really unique) on some tablets. FAIL...
The only problem that I know of is that it is only available if Wi-Fi is enabled.
I think this is a big problem because some smartphone users probably never turn Wi-Fi on. Your app can turn Wi-Fi on itself, but this means your app needs an additional permission "android.permission.CHANGE_WIFI_STATE".
Your general issue - how to uniquely identify the device - is widely discussed, e.g.
Is there a unique Android device ID?
http://android-developers.blogspot.ca/2011/03/identifying-app-installations.html
In this video from last year Google I/O, Reto Meier talked about exactly that problem off identifieng a device correctly.
For the solution you will have to watch the video, because I don't remember it anymore. But I do remember his concerns about the "MacAddress"-Solution. The problem about this solution his that it addresses a particular device and not a particular "installation", think of the problem when a user, who installed your app, sells his phone to another person which will also install your app. With the MacAddress you have no chance to distinct between those two ...

Fetching Android MSISDN value

I have a query. Can someone please guide me how to get my MOBILE MSISDN Number. Is there any sample application for fetching/ displaying the MSISDN number. I need to get the MSISDN number. Any sample project will be of great help.
Thanks in advance.
It has been covered in some topics, namely: Programmatically obtain the phone number of the Android phone .
However, bear in mind that this doesn't always work. With a couple of portuguese SIM cards at least, I wasn't able to retrieve the phone number using these methods.
Quoting from #Johan's answer in that topic:
There is no guaranteed solution to this problem because the phone
number is not physically stored on all SIM-cards, or broadcasted from
the network to the phone. This is especially true in some countries
which requires physical address verification, with number assignment
only happening afterwards. Phone number assignment happens on the
network - and can be changed without changing the SIM card or device
(e.g. this is how porting is supported).
I know it is pain, but most likely the best solution is just to ask
the user to enter his/her phone number once and store it.

Use Android GPS to detect and connect with other phones

So I asked something similar yesterday and did receive an answer to my question, however I don't really think I asked it correctly and therefore didn't receive the exact information I needed.
I'm in search of an API, some open source code, or even just a way that someone else has achieved this on the Android. I'm making an app that needs to find all other Android devices within a specified radius. For example, when you open your Android Google Maps App, and you search for say "Restaurants [ZipCode]", it uses a radius modified from your zip code and finds all of those places. The GPS gets YOUR location, and maps uses that information to find restaurants within an address close to that passed in location.
Instead, I want to be able to use the GPS to find my location (as it can now easily), but instead of finding things on a map (which is already built in), I want to be able to find other GPS enabled Android phones. I get that they will have to be broadcasting their GPS signal at the same time as well (since they don't have their data stored with some sort of central database as a restaurant would). However, I don't just want to FIND these phones, I want to send/receive data from these phones (with correct permissions obviously).
Now, I've found things like the Bump API. However, BUMP uses the phones sensors to spark this search. So basically, if you "bump" your phone with another and have the app running, it will THEN go ahead and use GPS to find the location of the other phone you just bumped with and exchange data between them. This is like EXACTLY what I want to do however in their API, they do not provide the functionality to just say, "Hey, give me all phones within a mile from me."
I've also found API's that can do exactly what I need but they have to be on the same Bluetooth range or on the same Wi-Fi network, which doesn't suit what I need at all.
Do you guys know of anything that can fit exactly what I need that already exists? Or a way to maybe modify Bump API (if you've done it), to not have to use the phone sensors and find phone information directly through GPS for phones around you? Or is there something that exists over a 3g/4g network instead of only wi-fi/Bluetooth?
Thanks guys.
Instead of frequently posting locations to an external server, couldn't the GPS realize other things broadcasting a GPS signal at a very specific time and send/receive data from them?
The only things that are "broadcasting a GPS signal" are satellites.
We would like to accomplish this without the use of an external server.
You have no choice but to use an external server, whether you like it or not, both for discovery and for later communication.
Do you guys know of anything that can fit exactly what I need that already exists?
Foursquare, Google Latitude, Yahoo Fire Eagle, and so on.
To do this via GPS, you would have to have all the phones frequently posting their locations to a network server, which could then inform them of others nearby.
Needless to say this would be opt-in only!
And it may have negative consequences for battery life, unless you make it update infrequently, which may limit its usability.
The advantage of having an explicit trigger action to both phones is that they only need to query the GPS and inform the server to find each other by location when they've both been triggered.
You would probably have to author your own application - then you could do this server-side and push things. If you're trying to push data to random Android phones - you're out of luck. Most people aren't going to want this, and probably aren't going to have the apps necessary to receive and understand it. With Bluetooth networking you'd need authorization, and most Androids don't have a capability to transfer random data by Bluetooth out of the box (though you certainly can get software to do it).
Honestly, malware and tracking are the reasons this really isn't possible, but even if they weren't, you would still need an application on the receiving devices that understand what you're sending them. And if you're widely spread enough, you'd probably want to send it to a server to disseminate anyway (for the transmitting phones bandwidth costs at least).
Develop a server application that your android app logs into. Send the GPS location every time the phone moves over a present distance. Either send a query request to the server to ask it if any other phones are in range, or get the server to inform the phone of a new device in range.
You may run into server scalability problems, so thats something to think about.
Also, this would be a big battery drain, and so your users may not be too keen to run it, not to mention the privacy element.
You need to rethink what you're trying to do. Android devices don't "transmit" any GPS signal, they are simply receivers, with signals from satellites. So the phone can easily get a location for itself, but the location of other devices is very, very private information. To get access to location for other phones, you either need to be on the same network as them (bluetooth, wifi), or you need them to use a server-based service to send locations to, like Google Latitude.
I'd be highly unlikely to sign up to a service like that. My location is very private, I share it with some people, but I cannot seem myself openly sharing it with an app, without a very, very good reason.
It seems to me that you need to build a server-based application, e.g. on Google App Engine, have people sign up, and agree to their location being sent to that server, so other phones running your app can access that information from the central store.
The question now has a very simple solution to it. All you have to do is set up a Geofence and monitor it for entry and exit of users. Geofence allows you to choose a geolocation and set a circle of desired radius around it. When someone enters or exits the location you can get notified and perform desired action.
Visit this link for further details on how to use this in Android.
All the comments from other folks about not being able to pick up the signal from others phones are correct. There is a completely different alternative system however in the network based location services. This is a model where you ask a carrier network for the location of a handset, which the carrier network needs to track for enhanced 911 service in the US (I'm unaware of how widely deployed this is in other areas, and how many different services you would need to use to cover other areas).
It's potentially a very expensive route however. And it won't just automatically work for all handsets, I believe the users will have to be opted into sharing location with your service. This is how services like Loopt had initially setup their location info so that it could be passively collected without negatively impacting handset battery life. There are some third party services that front for a cross-carrier service such as Location Labs:
http://locationlabs.com/
As well as third party location services like Skyhook Wireless, who might be able to get you some info of the sort (though I don't think what you're looking for maps to any of their existing APIs)

Android: Connect two phones wirelessly?

I'm interested in fleshing out an idea for a Android phone app, and I'm wondering if this is possible. So I would have the app running in the background on Phone A, then when it finds another Android phone B, it saves certain information like time, GPS location, just state variables.
But if the other phone is also running the same app, the two phones connect and share trivial non-private information.
Hypothetically, would this be possible? Would I go through a local ad-hoc Wi-Fi connection, or constantly broadcast Bluetooth?
If both people have the same app, you could do it in a round about way. If two people installed the app on their phone and agreed to have their gps coordinates shared, you could upload both sets of gps coordinates to a server as the people move around. The server could then compare which people are close to each other. When the user wants to share information with another user, the phone just needs to ask the server who is in their vicinity and sharing could be done over the internet. This is essentially how Bump works. Bumping two phones together triggers a call to the server to see who else is bumping in that vicinity at the same time. After phones close by are discovered, you might be able to trigger bluetooth pairing and sharing if you don't want to share over the internet.
Bluetooth is the easiest way for two phones to communicate directly with each other. However, both phones would have to be paired through the Settings->Wireless->Bluetooth menu. You would experience better range and speed with WiFi, but this requires a router as far as I know.
I found out how this can be done, use the viewranger app on both phones, create a user and log into the app on both phones. I set this up with myself as the user. Then the second phone (the one with broken gps) is used to track the user who is in my back pocket.
The user in both cases is me.
The problem with this is that a phone signal is required.

Categories

Resources