<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bluetooth Pairing with NrfUART in  android</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29650/bluetooth-pairing-with-nrfuart-in-android</link><description>The Bluetooth pairing is not working properly. I am developing the Application based on Bluetooth pairing with UART. Here I have included my concept and Program.Help me out to fix the problem. 
 My Expected Result is If the user is press the Connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2018 11:37:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29650/bluetooth-pairing-with-nrfuart-in-android" /><item><title>RE: Bluetooth Pairing with NrfUART in  android</title><link>https://devzone.nordicsemi.com/thread/117748?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 11:37:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03af9a6d-4ab2-47a5-a8d8-b3ef3bbad4b5</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So there are two things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I would recommend you to base your project on BLE library, which handles or common patterns and problems. You&amp;#39;ll find if here: &lt;a href="https://github.com/NordicSemiconductor/Android-Ble-library"&gt;github.com/.../Android-Ble-library&lt;/a&gt;
In the Readme you&amp;#39;ll find links to two projects that use this lib: very simple nRF Blinky and more complex nRF Toolbox.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But still even when you&amp;#39;ll use this lib the system popup to enter pin will be shown. The reason is that the broadcast that you want to receive (BluetoothDevice.ACTION_PAIRING_REQUEST) is sent by the system whenever a device wants to pair with pin. Every registered app may respond to it. Yours will provide the pin, but the system Bluetooth app will display a popup. Unfortunately you can&amp;#39;t do anything about it, in my opinion, I wish I was mistaken.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After you provide the pin with setPin(..) the device will bond and you should get &lt;a href="https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_BOND_STATE_CHANGED"&gt;ACTION_BOND_STATE_CHANGED&lt;/a&gt; broadcast with State bonded. You&amp;#39;ll not get any connected event. When you&amp;#39;ll use the BLE library, you&amp;#39;ll get onBonded (or similar) in the Callbacks.&lt;/p&gt;
&lt;p&gt;Hope that helped,
Aleksander&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>