Skip to content
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 from
Closed

Added Wearable-Actions to Notifications #3010

wants to merge 2 commits into from

Conversation

@chr1shaefn3r
Copy link
Contributor

@chr1shaefn3r 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
Copy link
Contributor

@mcginty 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
Copy link
Contributor Author

@chr1shaefn3r 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();
Copy link
Member

@moxie0 moxie0 Apr 22, 2015

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

Copy link
Contributor Author

@chr1shaefn3r chr1shaefn3r Apr 22, 2015

true that, will fix.

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 feature/WearableNotifications branch Apr 23, 2015
pR0Ps added a commit to SilenceIM/Silence that referenced this issue Apr 24, 2015
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
Copy link

@midi 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
Copy link
Contributor Author

@chr1shaefn3r 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 mentioned this pull request May 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants