:47.408KB : :1 :2021-11-29 20:22:12
android broadcast实例对于感兴趣的可以参考。
private BroadcastReceiver batInfoReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
//如果捕捉到的action是ACTION_BATTERY_CHANGED,
//就运行onBatteryInfoReceiver()
if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
intLevel = intent.getIntExtra("level", 0);
intScale = intent.getIntExtra("scale", 100);
onBatteryInfoReceiver(intLevel, intScale);
}
}
};
10-12Android游戏案例开发大全
10-12mtk7668蓝牙驱动(Android)
10-04高通Android平台开发
12-02开发一款Android APP用到的工具