首页 > 代码库 > android蓝牙传输文件过程中关机,开机后状态栏没有对应通知
android蓝牙传输文件过程中关机,开机后状态栏没有对应通知
1. 修改OppReceiver.java
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED))
Modify to
if (action.equals(Intent.ACTION_BOOT_COMPLETED)){
if (FeatureOption.MTK_BT_PROFILE_OPP && btAdapter != null && btAdapter.isEnabled()) {
OppLog.i("ACTION_BOOT_COMPLETED, btAdapter.isEnabled ");
context.startService(new Intent(context, OppService.class));
}//Receive the system reboot Intent and start the opp service
} else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED))
2. 修改alps/mediatek/packages/apps/Bluetooth/profiles/opp/AndroidManifest.xml
<action android:name="android.intent.action.BOOT_COMPLETED" /> in OppReceiver
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED))
Modify to
if (action.equals(Intent.ACTION_BOOT_COMPLETED)){
if (FeatureOption.MTK_BT_PROFILE_OPP && btAdapter != null && btAdapter.isEnabled()) {
OppLog.i("ACTION_BOOT_COMPLETED, btAdapter.isEnabled ");
context.startService(new Intent(context, OppService.class));
}//Receive the system reboot Intent and start the opp service
} else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED))
2. 修改alps/mediatek/packages/apps/Bluetooth/profiles/opp/AndroidManifest.xml
<action android:name="android.intent.action.BOOT_COMPLETED" /> in OppReceiver
android蓝牙传输文件过程中关机,开机后状态栏没有对应通知
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。