New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Wearable-Actions to Notifications #3010

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@chr1shaefn3r
Contributor

chr1shaefn3r commented Apr 17, 2015

To better support wearable devices, I also added the notification actions via the "WearableExtender()" to the NotificationCompat.Builder.

This should give all the Android Wear-compatible device owner the possibility to mark incoming messages as read without the need to pull out their phone, aka. enable maximum laziness (but why else would you own a smart watch, right?).

Tested it with my own Pebble and worked great.

@mcginty

This comment has been minimized.

Contributor

mcginty commented Apr 17, 2015

Can you confirm that action is really missing on HEAD of master? I just tried it with a Wear emulator and it looks like it's already available even without this change.

@chr1shaefn3r

This comment has been minimized.

Contributor

chr1shaefn3r commented Apr 18, 2015

Yes, I can confirm that the actions is really missing on HEAD of master on my Pebble before this change.
Maybe this is more of an "Added Pebble support" PR then.

notificationState.getMarkAsReadIntent(context, masterSecret));
NotificationCompat.Action markAsReadAction =
new NotificationCompat.Action.Builder(R.drawable.check, context.getString(R.string.MessageNotifier_mark_as_read),
notificationState.getMarkAsReadIntent(context, masterSecret)).build();

This comment has been minimized.

@moxie0

moxie0 Apr 22, 2015

Member

looks to me like there's no reason to use a builder here

This comment has been minimized.

@chr1shaefn3r

chr1shaefn3r Apr 22, 2015

Contributor

true that, will fix.

notificationState.getMarkAsReadIntent(context, masterSecret));
NotificationCompat.Action markAllAsReadAction =
new NotificationCompat.Action.Builder(R.drawable.check, context.getString(R.string.MessageNotifier_mark_all_as_read),
notificationState.getMarkAsReadIntent(context, masterSecret)).build();

This comment has been minimized.

@moxie0

chr1shaefn3r added some commits Apr 15, 2015

[Notifications] Added mark_as_read to WearableExtender
To make the mark_as_read notification accessible to Android Wear
devices it is now added to the NotificationBuilder via the
WearableExtender.
This should allow for Android Wear device- and Pebble-users to
easily mark an incoming message as read via the smartwatch.

@moxie0 moxie0 closed this in 424a463 Apr 23, 2015

@chr1shaefn3r chr1shaefn3r deleted the chr1shaefn3r:feature/WearableNotifications branch Apr 23, 2015

pR0Ps added a commit to SilenceIM/Silence that referenced this pull request Apr 24, 2015

Add notification functionality to Android Wear devices.
This should allow for Android Wear device- and Pebble-users to
easily mark an incoming message as read via the smartwatch.

http://developer.getpebble.com/blog/2014/12/19/Leverage-Android-Actionable-Notifications/

Closes signalapp/Signal-Android#3010
@midi

This comment has been minimized.

midi commented May 14, 2015

Thank you @chr1shaefn3r
I noticed that the reply action is missing, could you add that?
It is super useful.

Another issue: #1699

@chr1shaefn3r

This comment has been minimized.

Contributor

chr1shaefn3r commented May 21, 2015

@midi you are welcome.

I'm working on porting @Karalix's PR (SMSSecure#135) to the TextSecure code base.
If I don't run in any major problem, expect a PR around next week.

@chr1shaefn3r chr1shaefn3r referenced this pull request May 23, 2015

Closed

Wearable reply #3244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment