How to request Bluetooth Permission and enable/disable Bluetooth in Android 12 or higher?
HTML-код
- Опубликовано: 10 сен 2024
- This video is about new bluetooth permission structure due to the change made by Google. As you know, we usually use bluetooth in our applications. Thus, we need to change bluetooth permission structure in our codebase.
If your app targets API Level 31(Android 12) or higher, you must define permission abide by these rules.
1- If you want to search nearby Bluetooth devices, you must add BLUETOOTH_SCAN permission.
2- If you want your device to be discovered by other devices, you must add BLUETOOTH_ADVERTISE permission.
3- If you want your device to be communicable with other devices, you must add BLUETOOTH_CONNECT permission.
4- If you want to find physical location of other Bluetooth devices, you must add ACCESS_FINE_LOCATION permission.
Footnote: For your legacy Bluetooth-related permission declarations, set android:maxSdkVersion to 30.
#android, #android12 ,#bluetooth ,#enable ,#disable, #connect
Thank you^^
Thank you very much.
can i get your source code?
thanks for sharing :)
It work, you need to have a keen eye though for it to work "{"
🤩🤩🤩👍
Please suggest me a topic that i could help more
@@androidcodelab2191video is really helpful 👏. may be on bluetooth pairing and discoverable and data transfer option..!😊
can i get source code?
No funciona pero gracias me quito bastante tiempo
😂