Nice video! Just a correction: you don't need to serialize among all peripherals. It is enough with one queue per BluetoothGatt object, since the Bluetooth stack internally can hold one queued operation per BluetoothGatt object. Also, the only benefit of not calling close directly after disconnect is to avoid getting a warning in the log about an internal NullPointerException. So I would say the workaround isn't really needed unless you want the log clean.
Tho the author regarding the queueing: also, please mind that device is using one antena for connecting to all devices, how it can transfer radio data simultaniously, so the api follow more less the phisical pattern bere. I think that might be cleare and less confusing why it is not so intuitive at first. Anyway, thank you for the video, lots of info I needed.
Amazing video. Informative and succinct. I am new to Android and I thought I was the only one being confused about where to start. Not to mention my Java is tacky, so I wouldn't blame myself. I would appreciate any leads on a descriptive video on multi connections since that's what I am interested in rn. I could not find one on your channel, so I took the chance to ask.
That's correct! One update since this talk was given: if you target API level 28 or newer, you _must_ request ACCESS_FINE_LOCATION; ACCESS_COARSE_LOCATION doesn't cut it any more.
Did you check the permission? You have to even if you put it in the manifest: if((ContextCompat.checkSelfPermission(application, Manifest.permission.ACCESS_FINE_LOCATION)) ==PackageManager.PERMISSION_GRANTED) { val settings = ScanSettings .Builder() .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY) .setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES) .build() bluetoothScanner.startScan(null, settings, scanCallback) }
while scanning / connecting or doing any other operations, do we need to do it in a background service or calling the callbacks in the activity is ok? I am working with BLE for the first time on android so I am confused about it. Please help me, Sir :)
You can safely call methods from the main thread in your Activity or Fragment. However, note that when your callback methods are invoked by the framework, they will NOT be invoked on the main thread (so you'll need to explicitly return to the main thread before updating your UI).
Unfortunately there is no source code available with this talk (it was based on a proprietary project). I recommend checking out github.com/NordicSemiconductor/Android-nRF-Blinky and the underlying library github.com/NordicSemiconductor/Android-BLE-Library/ to see how to use these concepts in practice.
This is the greatest video about the BLE technology that I've ever seen. Thanks a lot.
Finally, that one worthy video for BLE . Thanks!
Finally !!!!!!! A saviour is here!!!!! finally someone taught this in ENGLISH !!!! I am subscribing to this channel!
a tip: watch movies at flixzone. I've been using them for watching loads of movies lately.
@Izaiah Flynn Definitely, have been watching on flixzone for years myself :)
This is one of the best presentations I have ever seen on any technical topic, it's concise, informative and perfectly explained.
Thank you very much!
Thank you for the very kind words :)
Thank you very much! This talk worth gold!
Nice video!
Just a correction: you don't need to serialize among all peripherals. It is enough with one queue per BluetoothGatt object, since the Bluetooth stack internally can hold one queued operation per BluetoothGatt object. Also, the only benefit of not calling close directly after disconnect is to avoid getting a warning in the log about an internal NullPointerException. So I would say the workaround isn't really needed unless you want the log clean.
Tho the author regarding the queueing: also, please mind that device is using one antena for connecting to all devices, how it can transfer radio data simultaniously, so the api follow more less the phisical pattern bere. I think that might be cleare and less confusing why it is not so intuitive at first. Anyway, thank you for the video, lots of info I needed.
Finally found a good explanation for Bluetooth LE for android. Thanks!
Glad you found it useful; thanks for letting me know!
Thanks a lot, your video on ble is amazing.
Thank you for the kind words; I'm glad you found it helpful!
Wish I had watched this video BEFORE I wrote the app I'm working on right now but at least I feel confident that I've handled things properly :)
Props for getting it all figured out! Glad the talk helped you confirm your approach :)
Right on spot, clear and short.
Glad you liked it!
Amazing video. Informative and succinct. I am new to Android and I thought I was the only one being confused about where to start. Not to mention my Java is tacky, so I wouldn't blame myself. I would appreciate any leads on a descriptive video on multi connections since that's what I am interested in rn. I could not find one on your channel, so I took the chance to ask.
Wonderful information Stuart - thank you so much for this. Now I might not go mad.
Thanks for sharing this lesson and learned. You've done a great job !
i put a hole in my screen pounding the thumbs up.
Edit add back my initial question:
So is location required only for scanning?
That's correct! One update since this talk was given: if you target API level 28 or newer, you _must_ request ACCESS_FINE_LOCATION; ACCESS_COARSE_LOCATION doesn't cut it any more.
@@r7stuart good to know
@@axa.axa. Also, for API 28 and above, you may use companion device pairing instead, and you won't need any location permission at all.
hey.. I am not able to get devices... location and BLE is on though
Did you check the permission? You have to even if you put it in the manifest:
if((ContextCompat.checkSelfPermission(application, Manifest.permission.ACCESS_FINE_LOCATION)) ==PackageManager.PERMISSION_GRANTED)
{
val settings = ScanSettings
.Builder()
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
.setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES)
.build()
bluetoothScanner.startScan(null, settings, scanCallback)
}
Thank you so much!
while scanning / connecting or doing any other operations, do we need to do it in a background service or calling the callbacks in the activity is ok? I am working with BLE for the first time on android so I am confused about it. Please help me, Sir :)
You can safely call methods from the main thread in your Activity or Fragment. However, note that when your callback methods are invoked by the framework, they will NOT be invoked on the main thread (so you'll need to explicitly return to the main thread before updating your UI).
@@stuartkent5182 Thankyou sir✌️
could you please share link for source code download
Unfortunately there is no source code available with this talk (it was based on a proprietary project). I recommend checking out github.com/NordicSemiconductor/Android-nRF-Blinky and the underlying library github.com/NordicSemiconductor/Android-BLE-Library/ to see how to use these concepts in practice.
where is the source code
You're doing God's work good sir
🙏Thanks, glad to help!
Very informative...
HERO!!!!!! YOU ARE A FUC**** HERO