• Sounds great! I had a little try last night with something that'd grab a URL, pull data out of it and broadcast it. The BLE code you need is:

            BluetoothManager mBluetoothManager = (BluetoothManager)mContext.getSystemServ­ice(Context.BLUETOOTH_SERVICE);
            BluetoothAdapter mBluetoothAdapter = mBluetoothManager.getAdapter();
            BluetoothLeAdvertiser mBluetoothLeAdvertiser = mBluetoothAdapter.getBluetoothLeAdvertis­er();
    
            AdvertiseSettings.Builder settingsBuilder = new AdvertiseSettings.Builder();
            settingsBuilder.setAdvertiseMode(Adverti­seSettings.ADVERTISE_MODE_BALANCED); // was ADVERTISE_MODE_LOW_POWER
            settingsBuilder.setTimeout(0); // always!
            //setTxPowerLevel(ADVERTISE_TX_POWER_HIG­H.)
            AdvertiseSettings settings = settingsBuilder.build();
    
            AdvertiseData.Builder dataBuilder = new AdvertiseData.Builder();
            dataBuilder.addManufacturerData(0x0590, foundData.getBytes());
            //dataBuilder.setIncludeDeviceName(true)­;
            AdvertiseData data = dataBuilder.build();
    
            mAdvertiseCallback = new SampleAdvertiseCallback();
    
            mBluetoothLeAdvertiser.stopAdvertising(m­AdvertiseCallback);
            mBluetoothLeAdvertiser.startAdvertising(­settings, data,
                    mAdvertiseCallback);
    
About

Avatar for Gordon @Gordon started