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

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 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

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
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 April 23, 2015 18:15
pR0Ps pushed a commit to SilenceIM/Silence that referenced this pull request 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 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

@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
Development

Successfully merging this pull request may close these issues.

None yet

4 participants