On Android 5.0 there is an option through Settings -> Sound & notification -> App notification -> Calendar (for example)
to go directly to the notification settings of the app.
I also know it's a flag in the manifest as described in this DEV.BYTES talk.
How can it be achieved, what is the flag used?
Here is a screenshot for more clarification:
Go to Settings > System > Notifications & actions , under Get notifications from these senders select the app, and then under Priority of notifications in action center select Top.
Build and issue the notification: Create an Intent that starts the Activity . Set the Activity to start in a new, empty task by calling setFlags() with the flags FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK . Create a PendingIntent by calling getActivity() .
Navigate to and open Settings, and then tap Notifications. Tap Advanced settings. Tap Show notification icons, and then adjust your desired settings. For example, you can choose to show all notifications, your three most recent notifications, or so on.
You need to add the Intent
category Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES
to the Activity
you'd like to launch through your AndroidManifest
. A simple example would be something like:
<activity android:name="com.example.packagename.YourSettingsActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
For more information, refer to the Settings app and specifically the NotificationAppList
and AppNotificationSettings
fragments.
Results
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With