• 5

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I am building an Android Application that needs the Notification Accessibility permission. My thought is to take the user to the Notification Accessibility page when the app is first started, How can I do this via intent?

To open NotificationAccessSettingsActivity via intent you could do something like this:

startActivity(new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS));

If you want to check the permission you could use:

private boolean isNotificationServiceRunning() {
ContentResolver contentResolver = getContentResolver();
String enabledNotificationListeners =
        Settings.Secure.getString(contentResolver, "enabled_notification_listeners");
String packageName = getPackageName();
return enabledNotificationListeners != null && enabledNotificationListeners.contains(packageName);


  • 1
Reply Report