So in my app at the moment when the user first loads it up they get a prompt to go to the Notification access menu. If they select yes it redirects to it, if they say no they go just go onto the apps page.
private AlertDialog buildNotificationServiceAlertDialog() {
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setTitle("one");
alertDialogBuilder.setMessage("two");
alertDialogBuilder.setPositiveButton("yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
startActivity(new Intent(ACTION_NOTIFICATION_LISTENER_SETTINGS));
}
});
alertDialogBuilder.setNegativeButton("no",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
return (alertDialogBuilder.create());
}
When I click "yes" it just closes the app and when I press "no" it does what it should. I've tested this on with other apps and my app does appear in the Notification access menu but I can't redirect to it from my own app.
Any one have any ideas why it's not working?
Thanks.