Reputation: 5817
I want RPi to be hinted when an android phone receive a phone call, and be able to view the calling number, Also, to be able to make calls to other phone numbers on certain events.
How to connect the phone and RPi, and what type of data they should exchange to accomplish this?
Upvotes: 0
Views: 7195
Reputation: 4033
One option would be Bluetooth: Put a Bluetooth stick into your RPi, pair it with the Android device, and possibly emulate a hands-free device, e.g. using HFP for Linux.
Otherwise, you could use TCP/IP if your Raspberry Pi and your Android device are connected to the same network (e.g. your home network with your Android phone being connected via WiFi and your RPi connected via Ethernet, or if your RPi acts as a WiFi AP and your Android is connected to it). For this, you would need to write a custom Android app (or check if someone else already did) that reacts to incoming calls and sends information to the RPi, and receives requests to dial a number and makes the call (requires the CALL_PHONE
permission and cannot dial emergency numbers like 911).
If you want a wired connection, ADB via USB would likely be the easiest way to do it. You can use it to send intents (to make the phone dial a number) and read debug output from the phone (to give the RPi the incoming call numbers).
Upvotes: 1