开发者

Android : unable to enable bluetooth adapter

开发者 https://www.devze.com 2023-03-09 23:24 出处:网络
I am running an embedded system on android 2.1. The system has a开发者_StackOverflow社区 bluetooth chip.

I am running an embedded system on android 2.1. The system has a开发者_StackOverflow社区 bluetooth chip. Calling getDefaultAdapter returns an adapter so BT is available however i'm not able to enable the adapter even when user gives permission.

I also tried using bluetoothadapter.enable() and its still not working.

I've tested the code on a phone and it works,

What could be going wrong?


Do not use without explicit user action to turn on Bluetooth.

Bluetooth should never be enabled without direct user consent.

See the documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消