connectivity-samples icon indicating copy to clipboard operation
connectivity-samples copied to clipboard

Bluetooth Le Gatt Sample is Not Working.

Open VikasRana007 opened this issue 3 years ago • 5 comments

This Project sample is not working , team must work on it for all devices this may work on old devices but not working in Android 12

popping up the dialog again and again for enabling location permission and for nearby devices permission but i have given this permission already,

so Please check the code then push it

thank you

VikasRana007 avatar Jul 19 '22 13:07 VikasRana007

Check bluetoothLeChat example. It's working.

KaneZMY avatar Aug 04 '22 03:08 KaneZMY

The "Bluetooth Le Gatt Sample" is not working because of changed permissions in new Android SDK's. I modified and appended the code in AndroidManifest.xml and DeviceScanActivity.java and now it is running on my Android 12 device successfully.

The complete example is available on my GitHub repo https://github.com/AndroidCrypto/BluetoothLeGattSdk33, have fun.

@Android-Team: maybe you can make the changes in your code as well and then close this issue, thanks.

Kind regards, Michael

AndroidCrypto avatar Nov 06 '22 09:11 AndroidCrypto

I tried running that sample on an Android 11 and Android 10 phone and the scan always comes out empty. Maybe that explains it. Scary to see how a company like Google does not organise maintenance and further development of such samples.

Slion avatar Jan 15 '23 07:01 Slion

@KaneZMY How did you check that it was working? Which device did you scan which smartphone did you use?

Slion avatar Jan 15 '23 07:01 Slion

I used huawei xs2 and other android pda. Its working fine now.

Stéphane Lenclud @.***>于2023年1月15日 周日15:31写道:

@KaneZMY https://github.com/KaneZMY How did you check that it was working? Which device did you scan which smartphone did you use?

— Reply to this email directly, view it on GitHub https://github.com/android/connectivity-samples/issues/268#issuecomment-1383078200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7HNWFIRUNMBBK3PVJENTDWSORVRANCNFSM5375QTPA . You are receiving this because you were mentioned.Message ID: @.***>

KaneZMY avatar Jan 19 '23 02:01 KaneZMY