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).
source share