I'm trying to set some sytem settings in my app, and therefore i was hoping to use this plugin to handle the permissions. Unfortunately, when I'm trying to request the permission it simply fails.
I found a solution by manually asking with this code:
if (android.provider.Settings.System.canWrite(application.android.context)) {
// permission granted
} else {
const intent = new android.content.Intent(android.provider.Settings.ACTION_MANAGE_WRITE_SETTINGS);
intent.setData(android.net.Uri.parse("package:" + application.android.foregroundActivity.getPackageName()));
intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
application.android.foregroundActivity.startActivity(intent);
}
Maybe something like this could be added to this plugin?
Hey there,
I'm trying to set some sytem settings in my app, and therefore i was hoping to use this plugin to handle the permissions. Unfortunately, when I'm trying to request the permission it simply fails. I found a solution by manually asking with this code:
Maybe something like this could be added to this plugin?