• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android App Detect when two phones touch

So I am making an app which needs to detect when two phones are close (1-2meters or less) and transmit some small amount of information (some strings and such).

I have been looking at the Google Nearby Connections API. But i cant limit that to just work when the phones are within 1-2 meters. And it also drains a lot of battery and both of the phones need to both Advertise and Discover at once.

Does anybody here know how I could do it? Something like NFC, Bluetooth Low Energy or??
 
I'm not a dev of course, but I know with NFC the phones do have to pretty much touch each other, to exchange data, like 1-2cm. Also not all devices have NFC. So Bluetooth Low Energy (BLE) is what you have to use?
 
I'm not a dev of course, but I know with NFC the phones do have to pretty much touch each other, to exchange data. Also not all devices have NFC. So Bluetooth Low Energy (BLE) is what you have to use?
So to be honest, I would use either one of those methods if just I could find how to it. with some examples
 
Back
Top Bottom