• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

BLE ScanSettings/AdvertiseSettings

brumm63

Lurker
Hi all,

I have been working on a reverse engineering project for a particular android application and I have come across some interesting methods which I can not find any documentation for.
This application uses the Android Bluetooth Low Energy API which involves setting up some ScanSettings and AdvertiseSettings.
For example, when the application makes it's AdvertiseSettings object it uses the AdvertiseSettings.Builder as so:
Code:
new AdvertiseSettings.Builder().setAdvertiseMode(100).semSetCustomAdvertiseInterval(i).setConnectable(true).setTxPowerLevel(3).build()

The part I do not understand and have not been able to find any information on is the
Code:
setAdvertiseMode(100)
and then
Code:
semSetCustomAdvertiseInterval(i)
.
From the android documentation, the
Code:
setAdvertiseMode
method should take one of three options:
ADVERTISE_MODE_LOW_POWER = 0, ADVERTISE_MODE_BALANCED = 1, or ADVERTISE_MODE_LOW_LATENCY = 2.

As well as this, the
Code:
semSetCustomAdvertiseInterval
method does not seem to exist in the android documentation or any where I can find.

A similar thing happens when the
Code:
ScanSettings
are made using
Code:
ScanSettings.Builder
. It uses:
Code:
builder.setScanMode(100)
.

If I try and make a ScanSetting or AdvertiseSetting that is set to mode 100 within my own application, I just receive errors.

So I am wondering if anyone has any idea or can enlighten me on what may be happening here?
 
Back
Top Bottom