<?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>Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21814/android-template-app-problems-with-reconnection</link><description>We are using the Android nRF toolbox v2.4.0 and have successfully implemented the Template app. The app will reliably connect with our device and functions well. The only problem is when we disconnect. 
After a successful connection and disconnection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Jun 2017 16:27:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21814/android-template-app-problems-with-reconnection" /><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85699?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 16:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:799b13c9-978d-43a8-9072-d31bbe0d5750</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;Any further comments?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85694?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 20:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f890a77a-4103-48c0-bd3f-c94ccdfb849b</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;The phone is only used for development and there is nothing else running except this app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85693?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 20:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:040e30bf-e20f-4af9-b229-4bee68827ed7</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Are you sure you don&amp;#39;t have any other app running in the bg that connects to the same device? For example nrf connect? Please, close nrf connect with the back button, not home and try again. Or any other app that&amp;#39;s​using Gatt Server (perhaps even yours?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85692?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 20:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f8e696-7976-41f9-b4f4-9bc087079939</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;Hi,  Thanks for the response.  I have not modified the internal code at all.  I&amp;#39;m starting to wonder if the device is not being disconnected at all.  Which would explain why its not on the list and why rebooting the device does cause it to show up on the list.  I have been depending on the onConnectClick link from the button to the internal BleManager code, but have recently moved to a different button.  What is the correct method to call from my main activity to disconnect a device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85695?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 13:46:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08507ced-c395-42d3-b47f-0df44691a946</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, I&amp;#39;ve checked the Template in nRF Toolbox 2.4 Out-of-the-box and after disconnecting I was able to see my device on the list. That means that the scanner and disconnection worked OK.
Did you do any changes in the scanner? Perhaps it doesn&amp;#39;t show a device with the same address that was already there before, but it&amp;#39;s something you must have written on your own.
I tried the Template with HRM sample from SDK 8 (as this one was laying on my desk).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85696?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 00:50:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38eb151e-dcfd-4d2d-b8f9-d0d3e24a78d3</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;I get that.  You are saying that an out-of-the-box version of the nRF Toolkit works fine.   Clearly something in the app is different.  I&amp;#39;m guessing that an object in the BleManager is not getting cleared onDisconnect.  Can you recommend what object holds the state of the last connection?  Or is there a call I can make into the BleManager to clear the state?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85691?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 13:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:701e4b64-e000-4292-ade8-d3c5cd2722f2</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I just tested here with Nexus 5X, Android 7.1.2,  nRF Toolbox v. 2.4.0 --&amp;gt; Template, and nRF52-DK, SDK12.1 -&amp;gt; ble_app_hrs, S132 v.3.1.0, and it is no problem to reconnect the nRF52-DK..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85698?ContentTypeID=1</link><pubDate>Mon, 08 May 2017 08:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dcc5ac3-0bee-4aa6-83cb-c6cd09bcff70</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;Android SDK is nRF toolbox v2.4.0.
The mobile phone is a Nexus 5X with Android 7.1.1.
The device is running an nRF51 with SDK 12.1 and BLE 4.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85697?ContentTypeID=1</link><pubDate>Mon, 08 May 2017 08:15:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:385f33e2-cced-49e5-8b89-1755874d86e3</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Which phone, version of Android, and version of nRF Toolbox do you have?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85690?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 07:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a145cc1-cf46-41b6-9ca8-74ab10a5ab0a</guid><dc:creator>Hephaestus</dc:creator><description>&lt;p&gt;@Kristin.  Thank you for the response.
Using the nRF Connect app (Android), I can connect and disconnect repeatedly without a problem.
Also, if I do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press Connect. Our device is listed on the Available Device page.&lt;/li&gt;
&lt;li&gt;Choose our device. Connection is successful.&lt;/li&gt;
&lt;li&gt;Disconnect by pressing the Disconnect button. Disconnection is successful.&lt;/li&gt;
&lt;li&gt;Press Connect. Our device is not listed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reset/restart our device&lt;/strong&gt;.  &lt;strong&gt;Our device is still not listed.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If our device had stopped advertising after the disconnect, then I believe that it will reengage advertising after the reboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Template App: Problems with reconnection</title><link>https://devzone.nordicsemi.com/thread/85689?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 07:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99e86916-7b58-48c1-baf2-d0452f2ca05c</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;When the phone disconnects from the device, could you double check that the device actually starts to advertise? Do you see the same problem if you use nRF Connect (Android)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>