赞
踩
1. 描述:当FM service监听到某个Receiver,需要前台更新UI时
2. 实例:手机切换飞行模式,
- //dongyang.li add for airplane mode.
- if(getAirplaneMode(getApplicationContext())) {
- mIsPowerUping = false;
- bundle = new Bundle(5);
- bundle.putInt(FmRadioListener.CALLBACK_FLAG, FmRadioListener.MSGID_AIRPLANE_MODE);
- bundle.putBoolean(FmRadioListener.FLAG_AIRPLANE_MODE, true);
- notifyActivityStateChanged(bundle);
- return;
- }
- private class FmServiceBroadcastReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- String command = intent.getStringExtra("command");
- if(Intent.ACTION_AIRPLANE_MODE
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。