我正在开发一个Android设置类型的应用程序,我需要检索设备的细节,我很难找到以下信号强度,服务状态和运行时间.
如何找到这3个当前值?我在哪里可以获得样本设置应用程序?

我需要在android中找到蓝牙mac地址.下面的代码
BluetoothAdapter.getDefaultAdapter().getAddress();
Run Code Online (Sandbox Code Playgroud)
它适用于18级及以下的api.
如何找到与api级别19相同的?
"要获得代表本地蓝牙适配器的BluetoothAdapter,在JELLY_BEAN_MR1及以下版本上运行时,请调用静态getDefaultAdapter()方法;在JELLY_BEAN_MR2及更高版本上运行时,请使用来自http:// developer的 BLUETOOTH_SERVICE"通过getSystemService(String)检索它. android.com/reference/android/bluetooth/BluetoothAdapter.html
我收到以下错误:
bluetooth binder is null
Run Code Online (Sandbox Code Playgroud)
既
BluetoothManager ba=(BluetoothManager)getSystemService(Context.BLUETOOTH_SERVICE);
bmac=ba.getAdapter().getAddress();
Run Code Online (Sandbox Code Playgroud)
和
bmac=BluetoothAdapter.getDefaultAdapter().getAddress();
Run Code Online (Sandbox Code Playgroud)
在模拟器和genymotion模拟器为api级别19,kitkat
救命!