Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen does android show a pairing dialog when using insecure RFCOMM bluetooth sockets?
    primarykey
    data
    text
    <p>I am trying to connect two unpaired android devices via Bluetooth for P2P networking purposes. MitM protection is not required. Android has the <code>createInsecureRfcommSocketToServiceRecord</code> and <code>listenUsingInsecureRfcommWithServiceRecord</code> for this (since API level 10), which works perfectly on modern devices. However, on a Galaxy Ace (Android 2.3.3 = API level 10, connecting with a Galaxy Nexus), it creates a pairing dialog. This happens both on incoming and outgoing connections. (<strong>Update</strong>: Updating the Galaxy Ace to Android 2.3.6 apparently fixes the problem. Is there a specific Android version that always/never does this?)</p> <p>After the pairing is accepted, the connection works. For this reason, I think this is not related to <a href="http://code.google.com/p/android/issues/detail?id=40101" rel="nofollow noreferrer">Issue 40101: createInsecureRfcommSocketToServiceRecord causes pairing dialog on Android 4.2</a> which should only happen if the service record does not exist.</p> <p>I assume this dialog cannot be avoided on devices where it comes up (if it can, explaining how to do this is a valid answer). For this reason, <strong>I would like to know when such a dialog is brought up.</strong> I did not find anything in the Android Java source (it goes native pretty quickly). I doubt it has anything to do with the Bluetooth version, since the Ace has Bluetooth 2.1 which is supposed to support the required "just works" connections.</p> <p>If there is anything that would allow me to detect whether a device will support connections without popping the dialog, or if it was clearly fixed to a certain android version, that would immensely help me.</p> <p>Also, I am looking for a way to easily <a href="https://stackoverflow.com/questions/16381416/is-there-a-way-to-set-app-compatibility-per-android-version-not-api-level-in-t">exclude such devices</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload