I am starting to program on Android since I just started working 3 months ago. I am making a project that connects an Android application with arduino using bluetooth. I already have the code for the Android application (bluetooth.adapter, sockets, .etc.). The connection code is already working. One of the goals is that the Android application automatically enters a password when connecting to a Bluetooth device without prompting the user to enter a PIN code.
Old posts on this forum do not really help. (many suggested using unsafe mode, but I need safe mode, also in my case, arduino is the server, while the cell phone application is the client, so the createInsecureRfcommSocketToServiceRecord () method does not work for me)
I searched and found this on the android developer site for the bluetoothdevice class:
setPairingConfirmation (logical confirmation) Confirm the password for the connection PAIRING_VARIANT_PASSKEY_CONFIRMATION.
PAIRING_VARIANT_PIN = "The user will be prompted to enter a PIN, or the application will enter a PIN for the user."
PAIRING_VARIANT_PASSKEY_CONFIRMATION = "The user will be asked to confirm the password displayed on the screen, or the application will confirm the access key for the user"
, ,
" ", android , . - ? !