com.lampa.startapp
com.lampa.startapp copied to clipboard
I want go to PermissionPage
I find the method of the jump privilege management page:
Intent i = new Intent("miui.intent.action.APP_PERM_EDITOR");
ComponentName componentName = new ComponentName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
i.setComponent(componentName);
i.putExtra("extra_pkgname", getPackageName());
try {
startActivity(i);
} catch (Exception e) {
e.printStackTrace();
gotoMeizuPermission();
}
But I don't know how to set params,I hope someone can help me, thank you ^ ^
My code:
let sApp = (<any>window).startApp.set({ /* params */
"intent": "miui.intent.action.APP_PERM_EDITOR",
"component": ["com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity"],
"flags":["Intent.FLAG_ACTIVITY_NEW_TASK"],
"intentstart":"startActivity",
}, { /* extras */
"extra_pkgname":"packageName",
});
sApp.start(function() { /* success */
console.log("OK");
}, function(error) { /* fail */
alert(error);
});
error:
Hi!
Please, update plugin to 6.1.4 and test this:
let sApp = ( < any > window).startApp.set({ /* params */
"noParse": true,
"action": "miui.intent.action.APP_PERM_EDITOR",
"component": ["com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity"],
"flags": ["FLAG_ACTIVITY_NEW_TASK"],
"intentstart": "startActivity",
}, { /* extras */
"extra_pkgname": "packageName",
});
sApp.start(function() { /* success */
console.log("OK");
}, function(error) { /* fail */
alert(error);
});