Pairing_variant_pin code how to use

  • Replies:0
  • Forum posts: 1

Sep 26, 2014, 1:11:58 PM via Website

Hi! I'm beginner in Android programming 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 :) :)