<?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] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89579/android-trying-to-scan-extended-adv-from-the-cadence-example</link><description>Hi guys. 
 With the nRF52840 DK(PCA10056) running the Running Speed and Cadence Service (RSCS) example, the nRF Connect app on my Galaxy S10/Android 12 was able to scan the &amp;quot;Bluetooth 5 Advertising Extension&amp;quot;. 
 This used the RSCS example and the S132</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Jul 2022 10:33:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89579/android-trying-to-scan-extended-adv-from-the-cadence-example" /><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/379285?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 10:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce488e3-36bd-4a83-ab6c-cd72ec4b0d41</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Thank you so much Simon! This last answer solves my ticket.&lt;/p&gt;
&lt;p&gt;Have a fun vacation!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/379275?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 09:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeb33ff0-51aa-48f8-a4d8-beb8cb985edf</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Yes, setLagacy(false) is needed and setting&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;PHY_LE_ALL_SUPPORTED&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;might be needed to find a device so the best is to set both. For scanner library&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;PHY_LE_ALL_SUPPORTED&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;should be set by default.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;val settings = ScanSettings.Builder()
    .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
    .setPhy(ScanSettings.PHY_LE_ALL_SUPPORTED) //not needed / set by default
    .setLegacy(false)
    .setReportDelay(500)
    .build()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going on vacation for two weeks now, so if you have any follow-up questions could you open a new ticket?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/377976?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 04:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad7d219-dbb6-4327-ae93-2a21ed18f877</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Thank you Simon! I didn&amp;#39;t know this GitHub library. This is great for me.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One question from the GitHub library sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ScanSettings settings = new ScanSettings.Builder()
				.setLegacy(false)
				.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
				.setReportDelay(5000)
				.setUseHardwareBatchingIfSupported(true)
				.build();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As Vidar has mentioned, when using the library, does this mean&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;is not needed?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;&lt;em&gt;ScanSettings.PHY_LE_ALL_SUPPORTED&lt;/em&gt; is required, how can I add both&lt;/p&gt;
&lt;p&gt;&lt;em&gt;setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;span class="pl-en"&gt;setScanMode&lt;/span&gt;(&lt;span class="pl-smi"&gt;ScanSettings&lt;/span&gt;.&lt;span class="pl-c1"&gt;SCAN_MODE_LOW_LATENCY&lt;/span&gt;)&lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;Thanks for your help!&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/377891?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 13:37:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386ddb92-434c-4c11-902f-f0525e8dd8ec</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I talked to a developer internally and got some insight.&lt;/p&gt;
&lt;p&gt;Could you try use the following API:&amp;nbsp;&lt;a title="https://developer.android.com/reference/android/bluetooth/le/scansettings.builder#setlegacy(boolean)" href="https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder#setLegacy(boolean)" rel="noopener noreferrer" target="_blank"&gt;https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder#setLegacy(boolean)&lt;/a&gt;, and set legacy to false.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is by default set to true and extended advertisement is not going to work because of compatibility reasons.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can also use our library for scanning (wrapper around Android API). Here is a nice example that demostrates how to use this library:&amp;nbsp;&lt;a title="https://github.com/nordicsemiconductor/android-scanner-compat-library#sample" href="https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library#sample" rel="noopener noreferrer" target="_blank"&gt;https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library#sample&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/376514?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2022 22:57:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e07b80df-2a52-4486-bad0-26a13bed6d69</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello Matthew,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay on this,&amp;nbsp;I will be taking over since Vidar is on vacation&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll get back to you tomorrow&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/376098?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 04:53:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37e0a9a4-274f-4f97-bfaa-2017eb316910</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Thank you Vidar! I think you meant to use&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;for the scan settings, right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then if I want to set the scanner to have both&lt;/p&gt;
&lt;p&gt;PHY_LE_ALL_SUPPORTED and&amp;nbsp;SCAN_MODE_BALANCED&lt;/p&gt;
&lt;p&gt;how can I configure both? Is it something like&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED + ScanSettings.SCAN_MODE_BALANCED)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;? Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [Android] Trying to scan extended ADV from the Cadence example</title><link>https://devzone.nordicsemi.com/thread/375490?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2022 09:10:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:605c8898-dc19-4717-80fa-21eda669d412</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The API documentation suggests to use startScan API instead: &lt;a href="https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner#startScan(java.util.List%3Candroid.bluetooth.le.ScanFilter%3E,%20android.bluetooth.le.ScanSettings,%20android.bluetooth.le.ScanCallback)"&gt;https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner#startScan(java.util.List%3Candroid.bluetooth.le.ScanFilter%3E,%20android.bluetooth.le.ScanSettings,%20android.bluetooth.le.ScanCallback)&lt;/a&gt;. This API supports the&amp;nbsp; &lt;a href="https://developer.android.com/reference/android/bluetooth/le/ScanSettings#PHY_LE_ALL_SUPPORTED"&gt;PHY_LE_ALL_SUPPORTED&lt;/a&gt; settings option, which I expect will enable extended scanning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>