Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 为什么停止安卓应用后广播接收器不工作?_Android_Broadcastreceiver_Recording - Fatal编程技术网

Android 为什么停止安卓应用后广播接收器不工作?

Android 为什么停止安卓应用后广播接收器不工作?,android,broadcastreceiver,recording,Android,Broadcastreceiver,Recording,我正在应用程序中使用广播接收器录制通话。在安卓5.0模拟器设备中,一切正常。如果我关闭应用程序,它会自动开始记录通话。但当我在运行安卓6.0的设备上安装相同的应用程序时,它会一直工作到应用程序运行为止。当我关闭应用程序时,录制未启动,广播接收器未触发。String manufacturer=“xiaomi” 我使用了这个代码,现在它工作正常。什么是6.0设备。在某些设备上,刷下应用程序不会杀死它,但会强制停止它。这不会触发安卓6.0棉花糖设备的接收器。是小米还是Oppow?解决方案是什么?因此,

我正在应用程序中使用广播接收器录制通话。在安卓5.0模拟器设备中,一切正常。如果我关闭应用程序,它会自动开始记录通话。但当我在运行安卓6.0的设备上安装相同的应用程序时,它会一直工作到应用程序运行为止。当我关闭应用程序时,录制未启动,广播接收器未触发。

String manufacturer=“xiaomi”


我使用了这个代码,现在它工作正常。

什么是6.0设备。在某些设备上,刷下应用程序不会杀死它,但会强制停止它。这不会触发安卓6.0棉花糖设备的接收器。是小米还是Oppow?解决方案是什么?因此,它不会强制关闭接收人,它说我可以在2天内接受我自己的答复
 if(manufacturer.equalsIgnoreCase(android.os.Build.MANUFACTURER)) {
        //this will open auto start screen where user can enable 
             permission for your app
                Intent intent = new Intent();
                intent.setComponent(new 
                ComponentName("com.miui.securitycenter", 
               "com.miui.permcenter.autostart.AutoStartManagementActivity"));
                startActivity(intent);
            }