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.
精彩评论