diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java
index 3cefdb7cd4..6901d930af 100644
--- a/app/src/main/java/eu/faircode/email/FragmentSetup.java
+++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java
@@ -116,6 +116,7 @@ public class FragmentSetup extends FragmentBase {
private CardView cardExtra;
private Button btnApp;
+ private Button btnNotification;
private Button btnDelete;
private Button btnMore;
private Button btnSupport;
@@ -190,6 +191,7 @@ public class FragmentSetup extends FragmentBase {
cardExtra = view.findViewById(R.id.cardExtra);
btnApp = view.findViewById(R.id.btnApp);
+ btnNotification = view.findViewById(R.id.btnNotification);
btnDelete = view.findViewById(R.id.btnDelete);
btnMore = view.findViewById(R.id.btnMore);
btnSupport = view.findViewById(R.id.btnSupport);
@@ -619,6 +621,18 @@ public class FragmentSetup extends FragmentBase {
}
});
+ final Intent channelService = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
+ .putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName())
+ .putExtra(Settings.EXTRA_CHANNEL_ID, "service");
+
+ btnNotification.setEnabled(channelService.resolveActivity(pm) != null); // system whitelisted
+ btnNotification.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startActivity(channelService);
+ }
+ });
+
btnMore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml
index 6ed7626d01..bd1e3e759b 100644
--- a/app/src/main/res/layout/fragment_setup.xml
+++ b/app/src/main/res/layout/fragment_setup.xml
@@ -909,6 +909,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvExtra" />
+
+
+ app:layout_constraintTop_toBottomOf="@id/btnNotification" />
+ app:constraint_referenced_ids="btnApp,btnNotification,btnDelete,btnMore" />