You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This service requires permissions on certain user actions, and I'm requesting them in the following way:
String[] permissions = {Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA};
Permissions.Options options = new Permissions.Options()
.setRationaleDialogTitle("test rationale")
.setSettingsDialogTitle("test title")
.setSettingsDialogMessage("test settings")
.setSettingsText(context.getString(R.string.action_settings))
.setCreateNewTask(true); //Needs to create a task because we're asking for permissions outside of activity context
final String rationale = "placeholder";
Permissions.check(context, permissions, rationale, options, new PermissionHandler() {
@Override
public void onGranted() {
//TODO
Log.d("test4636", "granted");
Toast.makeText(context, "granted", Toast.LENGTH_LONG).show();
}
@Override
public void onDenied(Context context, ArrayList<String> deniedPermissions) {
//TODO
Log.d("test4636", "denied");
Toast.makeText(context, "denied", Toast.LENGTH_LONG).show();
for (String perm : deniedPermissions) {
Log.d("test4636", perm);
}
}
});
With this setup, onGranted() and onDenied() are never called. Removing android:process=":ManagerProcess" from the service solves the issue, but I can't implement it that way because the service has to be running on a separate process due to other requirements. Is there any workaround to getting the callbacks to work when using android:process?
The text was updated successfully, but these errors were encountered:
My app runs a service on a separate process, defined in the manifest as such:
This service requires permissions on certain user actions, and I'm requesting them in the following way:
With this setup, onGranted() and onDenied() are never called. Removing
android:process=":ManagerProcess"
from the service solves the issue, but I can't implement it that way because the service has to be running on a separate process due to other requirements. Is there any workaround to getting the callbacks to work when using android:process?The text was updated successfully, but these errors were encountered: