<?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>How to get the BLE chip&amp;#39;s advertisement raw data on Android APP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11332/how-to-get-the-ble-chip-s-advertisement-raw-data-on-android-app</link><description>Dear all 
 Good day! 
 I want to develop the Android APP to received the BLE&amp;#39;s ad raw data(which is dynamic change). Which API should I called to get the raw data? And should I refresh the scan API to get the dynamic data ? Or do you have the demo code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Sep 2016 03:40:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11332/how-to-get-the-ble-chip-s-advertisement-raw-data-on-android-app" /><item><title>RE: How to get the BLE chip's advertisement raw data on Android APP</title><link>https://devzone.nordicsemi.com/thread/42616?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 03:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffe6919a-8788-418f-95d9-eae1986b95b4</guid><dc:creator>Jenson</dc:creator><description>&lt;p&gt;Anders&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; Thanks for your information, That helps.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Regards
Jenson&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get the BLE chip's advertisement raw data on Android APP</title><link>https://devzone.nordicsemi.com/thread/42615?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2016 13:47:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76d75e3e-9135-414a-873b-2925020f9d4f</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;You can find source code for our Smartphone demo apps &lt;a href="http://www.nordicsemi.com/Products/Nordic-mobile-Apps"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you check out the nRF UART app, see line 159 of DeviceListActivity.java:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;private BluetoothAdapter.LeScanCallback mLeScanCallback =
            new BluetoothAdapter.LeScanCallback() {

        @Override
        public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) {
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                	
                	  runOnUiThread(new Runnable() {
                          @Override
                          public void run() {
                              addDevice(device,rssi);
                          }
                      });
                   
                }
            });
        }
    };
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The scanrecord byte array contains the advertisement data.&lt;/p&gt;
&lt;p&gt;You should check out android&amp;#39;s documentation and &lt;a href="http://developer.android.com/reference/android/bluetooth/le/ScanRecord.html"&gt;Scanrecord&lt;/a&gt; and &lt;a href="http://developer.android.com/reference/android/bluetooth/le/package-summary.html"&gt;bluetooth LE&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>