开发者

Turn Bluetooth On and Off in Android 1.5 (SDK level 3)?

There are tons of pay and free bluetooth toggles on the market that work with Android 1.5 (SDK level 3). The problem is there is no visible API for this!

Does anyone have any working code snippits on how to enable and disable bluetooth that works on Android 1.5? I assume you must have to use some kind of reflection for it. There are some examples over on anddev.org, but they only work with Android 1.1 or lower.

This is for Android 1.5 (SDK level 3) and not Android 2.0 or greater. In And开发者_如何学运维roid 2.0 or later Google added easy to use APIs.


This may/may not be useful to you as a better example: http://code.google.com/p/android-wifi-tether/source/browse/#svn/trunk/src/android/tether/system

It selects the right classed based on the SDK level and then uses it to enable/disable bluetooth.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜