简体   繁体   中英

Dial number on Android phone from the Java app on PC

I need to remotely dial a number on the Android phone from a Java application running on the PC. The connection between the PC and phone can be over Bluetooth or WiFi. Is there a simple way how to do it? If necessary I can develop a separate part which will be running on the Android phone, but there is a limitation that the phone can't be rooted. I would like to avoid using any app available from the Google Play, unless it is opensource.

I'm thinking of a Bluetooth service or a web service running on the phone.

I think certainly you will need to write code that will run on the phone. The way that comes to mind is to write a socket server on the phone that waits for a client PC to connect and tell it what number do dial, then once it receives this use the normal phone dialer intent (link below). That shouldn't be too difficult.

The trickier part is that if you want to use this is any serious way (ie put it on the play store) you should have some sort of encryption / authentication so that random hackers walking by can't make your phone dial numbers.

To dial a number programatically, see this thread: Android dial a phone number programmatically

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM