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

Apps PAIRING_VARIANT_PIN how to use

michael004

Lurker
Sep 26, 2014
1
0
Hi! I'm beginner in Android programmin since I only started last month. I'm doing a project which connects the android app to arduino using bluetooth. I already have a code for the android app (bluetooth.adapter,sockets,.etc.). The code for connection is already working. One of the goal is for the android app to automatically input the password when pairing with the bluetooth device. I search and found this in android developer bluetoothdevice site:

PAIRING_VARIANT_PIN = "The user will be prompted to enter a pin or an app will enter a pin for user".

PAIRING_VARIANT_PASSKEY_CONFIRMATION = "The user will be prompted to confirm the passkey displayed on the screen or an app will confirm the passkey for the user"

using this code, the app will be the one to input the password and confirm
the password making it an "auto-connect" features but the android site does not give a sample code on how to use this. Does any of you have a sample code in using this or related process? I appreciate your help :) :)
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones