Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Android's Bluetooth may still have some glitches, however, in this case you wrote about the remote BT-Device:</p> <blockquote> <p>It always initiates the connection, and will refuse incoming connections.</p> </blockquote> <p>In your code snippet, you try just what should not work: Initiate a connection <em>from</em> the Android device <em>to</em> the remote device.</p> <blockquote> <p>I now detect incoming connection attempts and then start the connect()</p> </blockquote> <p>This is almost certainly the completely wrong approach - and, actually, it should <strong>not</strong> work at all. If it does intermittently on some devices this is more of a bug in those devices than an undocumented feature.</p> <p>So, when dealing with <em>incoming</em> Bluetooth connections on Android, use the listening server approach described e.g. in:</p> <p><a href="http://developer.android.com/guide/topics/wireless/bluetooth.html#ConnectingAsAServer" rel="nofollow">http://developer.android.com/guide/topics/wireless/bluetooth.html#ConnectingAsAServer</a></p> <p>using <a href="http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingRfcommWithServiceRecord%28java.lang.String,%20java.util.UUID%29" rel="nofollow">listenUsingRfcommWithServiceRecord()</a>.</p> <p>As for the pairing on Android devices: Pairing should be necessary only once for each remote device. Once the device is paired, Android stores the pairing information and will allow future connections without prompting for a PIN for pairing again.</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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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