Finding the location of the caller while talking on the phone using Android

I am new to android and I want to implement searching for the location of another phone and displaying my location on my device using Google Maps while I'm talking to this person.

+4
source share
2 answers

Given the fact that I currently do not know about a carrier company that provides APIs via a cellular network or server to access other phones, you will have to implement the infrastructure yourself.

Thus, I mean both the applications on the phone designed to transmit and receive location data, and the means to transfer this data between phones when a call is placed.

At this stage, it would be easier if you could programmatically embed metadata in the caller ID information of calls that you place from your Android phone, but unfortunately I do not think that such an API exists at the moment.

This leaves you with only two other options: the application on the caller’s phone sends location data through the server that you control, or through an SMS message to the number that he calls.

Using the server only works if both phones are connected to the Internet, so you must rely on data traffic to work with the transmitted location data.

Sending location data via SMS carries a certain amount for your user, because it either subtracts from the existing number of SMS messages included in their tariff plan, or simply charges them additionally if this plan is already powerful.

You can offer a clear alternative that you should inform the user about, to use one way or another; depending on the application and purpose, each of these alternatives may be appropriate (I think that this function is activated only for some specific phone numbers, if you use this application inside the company that is involved in the intervention on the site, so that any emergency situations that require automatic location notification during certain calls from the field).

+2
source

You have two options - both of them are probably not so feasible: 1. The presence of an application running on another phone that is designed to transfer the location to where it is needed. 2. The presence of a telephone company (operators) that provides you with an API through a cellular network or through your server access to another phone location.

Luck

0
source

Source: https://habr.com/ru/post/1369530/


All Articles