首页 > 代码库 > 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 

android蓝牙传输文件过程中关机,开机后状态栏没有对应通知