Can we locate a user via user's phone number in Android? - android

Is it possible to locate a user via user's phone number in Android? If an SMS can be sent to the user then we can also retrieve or get to know the location of the user who we sending the SMS.
I mean is it possible to program the following functionality:
App sends SMS to user's phone
App recieves SMS at user's phone from the SMS sender
App gets location coordinates of the user's phone
App sends location coordinates to the SMS sender via SMS
Also is it possible to retrieve the required location of the user via user's phone number via any other means apart from SMS, EMAIL or CALL?
How come Viber and VChat apps are locating user locations via their phone numbers?
Here are some apps on the app store:
Cell Tracker
Mobile Number & Phone Location
Mobile Number Locator
Seeking for a reliable answer.

Yess, possible with conditions:
If you have your app installed in the user phone and a server app communicating with this app, and there at last one of location service providers activated in the user phone, and some horrible android permissions!
In most of android phones there 3 location providers that can give exact location (GPS_PROVIDER 1m) or estimated (NETWORK_PROVIDER around 2-20m) and PASSIVE_PROVIDER (more in LocationManager official documentation).
1* App sends SMS to user's phone
Yess, can be server app or you create an android app if you want something automated, so you can do it manually by sending SMS from your default SMS app! I use Kannel: Open Source WAP and SMS Gateway and here (lot of APIs to send SMS )
2* App receives SMS at user's phone from the SMS sender
Yess, you can get all received SMS, and you can filter them by sender phone number! and do some actions when your specified sms received, basic tuto here (i do some actions according to the content of my SMS)
3* App gets location coordinates of the user's phone
Yess, you can get actual user coordinates easily if one of location providers is activated, so you can get last known location when the user have activated one of location providers, if those disabled or the phone don't have GPS hardware you can use Open Cell Id api to get the nearest cell coordinates(10m-10Km) or Loc8 api but those not available in all around the world, and some apps use IP location apis to get the country, city and province, here the simplest way to get current user location.
4* App sends location coordinates to the SMS sender via SMS
Yess, you can get sender phone number and send user location, immediately when SMS received or at specified times in the day.
(Those 4 yesses for you :) )
Viber and other apps that access to users locations, identify there users by there phone numbers by obligating them to send SMS to the server app to create an account and activate the free service (Ex:VOIP) , and lunch a service that can:
Listen for location changes (GPS, Network or Cell Id)
Send user location periodically(Ex: each 2 hours) or when user position changed!
Stock user locations in file and create a map based on daily locations
Receive SMS and update user location
Receive server app commend and update user location
Send events when user go inside or outside of a defined circle
Listen for what user say and record it or open live voip call :s
Maybe anything you think or u want to do :) !
And your application users must accept all of that when installing it, of corse i don't gonna install apps like this because i read permissions before installing :) and permissions maybe something like that:
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<-- and more if you wanna more -->
The final user will accept for something like that (those permissions of an android app u asked about):
This app has access to these permissions:
Your accounts
-create accounts and set passwords
-find accounts on the device
-add or remove accounts
-use accounts on the device
-read Google service configuration
Your location
-approximate location (network-based)
-precise location (GPS and network-based)
Your messages
-receive text messages (SMS)
-send SMS messages
-edit your text messages (SMS or MMS)
-read your text messages (SMS or MMS)
Network communication
-receive data from Internet
-full network access
-view Wi-Fi connections
-view network connections
-change network connectivity
Phone calls
-read phone status and identity
-directly call phone numbers
Storage
-modify or delete the contents of your USB storage
Your applications information
-retrieve running apps
-close other apps
-run at startup
Bluetooth
-pair with Bluetooth devices
-access Bluetooth settings
Camera
-take pictures and videos
Other Application UI
-draw over other apps
Microphone
-record audio
Lock screen
-disable your screen lock
Your social information
-read your contacts
-modify your contacts
-read call log
-write call log
-read your social stream
-write to your social stream
Development tools
-read sensitive log data
System tools
-modify system settings
-send sticky broadcast
-test access to protected storage
Affects battery
-control vibration
-prevent device from sleeping
Audio settings
-change your audio settings
Sync Settings
-read sync settings
-toggle sync on and off
-read sync statistics
Wallpaper
-set wallpaper

I checked play.google.com/store/apps/details?id=and.p2l&hl=en
They are not locating the user's current location at all.
So based on the number itself they are judging the location of the user. Like if the number starts from 240 ( in US) they they are saying location is Maryland but the person can be in California. So i don't think they are getting the user's location through LocationListner of Java at all.

Quick answer: No, at least not with native SMS service.
Long answer: Sure, but the receiver's phone should have the correct setup first. An app that detects incoming sms, and if a keyword matches, reports its current location to your server, which then pushes that info to the sender.

The answer is: you can't only through sms, i have tried that approach before.
You could fetch the base station IDs, but this won't help you a lot without the location of the base station itself and this informations are really hard to retrieve from the providers.
I have looked through the 3 apps you have listed in your question:
The App uses WiFi and GPRS location service, quite the same approach as Google uses on the phone. phonesavvy maybe has a base station location database or uses a database retrieved e.g. from OpenStreetMap or some similar crowd-based project.
The app analyzes just the number for country code and city code. No location there.
Dito.

Related

Masking call while making from inapp

Can anyone tell me on how to overwrite my apps name when a call is made from my app just how ola app does masking their name wherein the auto driver or the taxi driver to whom we have called doesn't know our name r when they call it comes under the name of ola not their name i.e the auto drivers name r taxi driver's name is it possible to implement such a feature in other apps also programatically if so can anyone tell me how to implement I search for masking of numbers and many others but unable to find .
Sadly to say, this just isn't entirely* possible. Here are some links detailing why:
Incoming Calls
Note: It is possible to display a custom GUI during an incoming call, but it is not always guaranteed that this custom GUI will be displayed first.
Pop up window over Android native incoming call screen like true caller Android app
Outgoing Calls
Note: it is possible to override the outgoing number called, but not to mask it
http://androidlabs.org/short-experiments/broadcast-receivers/process-outgoing-calls/
Ola App uses a backend telephony system, where taxi cab requests are sent to a phone center(owned by Ola).
Taxi cab drivers register and install a client app that automatically handles calls(and numbers).
This way the identity of the taxi cab driver and the rider can be masked.
When a taxi driver needs to call a rider, that call is passed through Ola's telephony system as well. This is why the phone number displayed on the rider's phone is different from the driver's real number.
Hope that helps...

WiFi-Direct getting device name

Is there a way to get my current Wifi-Direct device name without listening to WIFI_P2P_THIS_DEVICE_CHANGED_ACTION ? If wifi is already enabled I guess I cannot receive that intent.
I'm developing an app to create a WiFi direct group and share devices locations between peers. When I open a group I need to initialize a data structure, a map in the form of ( deviceName, lastLocation) with my location. A group is created by the user when pressing a button.
You will get WIFI_P2P_THIS_DEVICE_CHANGED_ACTION when you register for the WifiP2pBroadcastReceiver, it doesn't matter if wifi is already on.
Quote

How to send latitude and longitude to webservice in android without internet?

I have an idea of making an app in that truck drivers are there with GPS,SO they will get latitude longitude without internet,there will be an admin panel which can track the truck driver's location and location history,So My question is that the truck drivers will only having a GPS enabled Android device (WITHOUT INTERNET),SO how can the admin will track their location? Please suggest me for it .
I suppose you could try SMS messages, though, it might become rather expensive if the re-fresh rate for the location is high.
In simplest solution you would have a mobile device (you need to find one which incoming SMS you can fetch to the PC, might require some internet searching time) with normal number for receiving the SMS messages, or you could see whether you could get Operator service numbers (see whether using free-to-send number would be cheaper) and then get the data from the operator.

Restrict android application to specific region

I want my application to work in specific region e.g US.
We can limit distribution of application from play market but i found there are some hacks to install those apps.
I have to somehow limit the use within application.
For that I can retrieve user's GPS location and use Google's Geocode API for first run. But what if user travels to some other region?
I will have to use Location change listener to cater this scenario, but this will drain battery.
If I go for device's timezone, User can change it.
Is there any other thing i can possibly do to restrict application to specific region?
You can also check for the network the user is registered on with TelephonyManager
You have 2 methods that can be helpful.
GetNetworkCountryIso
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkCountryIso()
and
GetSimCountryIso
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getSimCountryIso()
Explanation
getNetworkCountryIso() will give you the iso for the country which the user is currenty registered for.
ie: If you're from Albania (al) and went to travel to USA (us) this will return "us"
getSimCountryIso() will give you the iso for the country where the SIM provider's country code.. ie: If you're from Albania (al) and went to travel to USA (us) this will return "al"
UPDATE
You can integrate (if server side available) http://www.whois.net/ip-address-lookup/ to look for the device IP address. You can get the IP like this.
How to get IP address of the device from code?
With a combination of all this functions (Wifi, network provider, IP, GPS, Google Play regions) you can reduce a lot the use limitations of your app. In the other hand if the user it´s advance enough to fake the IP using a proxy, doesn't turn on the Wifi / GPS and doesn't have SIM card, there´s not much more to do.
Hope it helps :)
As a continuation to my comment, you could go by those lines of filtering users by country code.
The problem - only some carriers store the phone number on the actual SIM card. If so, you will be able to obtain it using
TelephonyManager tMgr = (TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();
To avoid the instances of those carriers who don't store the actual number on the SIM - there is no way to retrieve the number seeing it is not stored on the phone.
So, what I would do, is simply on the first run of application, request the user to input his full phone number (including country code) - and store that in SharedPrefs. Then, you will know if to run the app or not.
Good luck, hope this has helped!

How to get Service Provider, not the Network Name

I have an Application (Operator Widget) which Displays the Name of the Network you are currently Connected to.
The Problem is that some Providers either share their Network with others (eg. T-Mobile UK uses 3's Network in some areas) or don't have an own Network and use the one of another Provider (eg. "bob" uses the Network of "A1").
The Problem is that the getNetworkOperatorName() always returns the Name of the Wireless Network (so T-Mobile Users will see 3 as their network...) which confuses Users.
Android itself on the Other hand shows the Service Providers name, what is the Function to do this?
Did you try getSimOperatorName()

Categories

Resources