android - onTaskRemoved() not getting called in HUAWEI and XIOMI devices -
i've been using ontaskremoved()
method in service detect when app removed device recent list swiping away. preform logging , other operations need take place when happens. works perfectly.
then checked method in huawei device running android 6.0. method never gets called. added log.d call , expected, log never appeared. same happens on xiomi device.
any ideas why happens , how resolve this? or there way detect app removed recent list out relying on ontaskremoved()
?
thanks
when user has installed app on xiaomi device, redirect user auto start activity , tell user switch on:
if (build.brand.equalsignorecase("xiaomi")) { intent intent = new intent(); intent.setcomponent(new componentname("com.miui.securitycenter", "com.miui.permcenter.autostart.autostartmanagementactivity")); startactivity(intent); }
use above code launch autostart activity page on xiaomi
Comments
Post a Comment