开发者

Find Caller Location while Talking on phone using android

I am new to android and I want to implemen开发者_运维技巧t finding the location of another phone and displaying their location on my device using Google Maps while I am talking with that person.


Considering the fact that currently I'm not aware of a phone carrier company providing an API over the cellular network or a server to access other phones' locations, you'll have to implement the infrastructure yourself.

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

It would be easier at this point if you could programmatically embed metadata in the caller id information of calls you place from an Android phone, but unfortunately I don't think that such an API exists at the moment.

This leaves you with only two other options: have the application on the caller phone send the location data either through a server that you control, or through an SMS message to the number it's calling.

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

Sending location data by SMS incurs some kind of cost for your user, as it either subtracts from the available number of SMS messages included in their carrier plan, or simply charges them extra if this plan is already over capacity.

You may offer a clear alternative, that the user should be informed about, to use one way or the other; depending on the application's scope and purpose, each of these alternatives may be suitable (I'm thinking of this feature only activating for some specific phone numbers, in case you'd use this app inside a company that deals in on-site interventions to some kind of emergencies, that require automatic location reportning at the time of certain calls from the field).


You have two options - both of them probably not so feasible: 1. Having an application running on the other phone which is designed to transmit the location to wherever needed. 2. Having the phone carrier company(s) providing you either an API over the cellular network or via their server an access to the other phone's location.

Good Luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜