Android Notification - First Cut #391
No reviewers
Labels
No Label
1app
2 apps
accessibility
android
before-beta
bug
duplicate
enhancement
first-contact
fixed
help wanted
infrastructure
invalid
low-priority
must-fix
needs testing
nice-to-have
question
tor
user-feedback
wontfix
No Milestone
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/ui#391
Loading…
Reference in New Issue
No description provided.
Delete Branch "android_tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit has the basics of notifications on Android working again, updated to the
latest Android SDK way of doing things (with channel IDs and grouping).
Android users will get notified when the app is open for new Peer Messages across all profiles.
In the future, this should be extended to add notifications for new peer invites, actual have actionable actions (accept/block)
and maybe even work when the app isn't open...
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/ui/822
@ -32,2 +29,3 @@
private static String NOTIFICATION_CHANNEL_ID = "cwtch_notification_channel";
private static int CONTENT_NOTIFICATION_ID = 2;
private static String CONTENT_NOTIFICATION_ID_NAME = "Notifications from Peers";
@ -72,0 +62,4 @@
Notification groupSummary =
new Notification.Builder(m_instance)
.setContentTitle("Cwtch")
.setContentText("New Message from Peer: " + o)
for strings, can you add these to
android/res/values/strings.xml
and load them here withgetString(R.string.idName);
I think that gives us a translatable path forward for Java, amazingly
@ -72,0 +77,4 @@
.setGroup(NOTIFICATION_CHANNEL_ID)
.setWhen(System.currentTimeMillis())
.setAutoCancel(true)
.setContentTitle("New Message from Peer: " + o)
@ -72,0 +78,4 @@
.setWhen(System.currentTimeMillis())
.setAutoCancel(true)
.setContentTitle("New Message from Peer: " + o)
.setContentText("[redacted: Open Cwtch App to see the Message]");
@ -117,3 +92,1 @@
description = "Cwtch Content Notification Channel";
importance = NotificationManager.IMPORTANCE_DEFAULT;
channel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, CONTENT_NOTIFICATION_ID_NAME, importance);
String description = "Cwtch Notification Channel";