question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

keep notification shade open upon clicking action button?

See original GitHub issue

notification clicked --> notification shade closes and app opens --> good. action button clicked --> notification shade closes --> not always good?

especially if the action results in the related notification still showing.

Your Environment

  • Plugin version: 0.9.0-beta.2
  • Platform: android
  • OS version: 7.1.1
  • Device manufacturer / model: nexus 6
  • Cordova version (cordova -v): 7.1.0
  • Cordova platform version (cordova platform ls): android 6.3.0
  • Ionic Version (if using Ionic): 3.19.1
  • Plugin config
this.localNotifications.on( 'switch-book', function( note, event ) {
    that.localNotifications.update({
        id: note.id,
        title: "Loading next book.",
        text: "Just a second...",
        ongoing: true,
        priority: -2,
        sound: null,
        color: null,
        led: null,
        smallIcon: 'res://ic_stat_notify.png',
        icon: null
    });
});

Expected Behavior

notification drawer should stay open if action does not result in clearing its notification.

Actual Behavior

notification drawer is closed no matter what: on notification click, action click, etc.

Steps to Reproduce

create new notification with action button. have action button do anything (or nothing), and notification shade will close every time whenever an action button is clicked.

Context

one of my action buttons updates the notification it’s attached to. it’s confusing for the user if the ‘update’ action button results in the whole notification shade closing, when they were just looking for the notification to update.

example: android’s default sms app (‘messages’) provides a ‘mark as read’ action for new text messages. upon clicking that action, the message is marked as read, and the notification shade remains open.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
katzercommented, Feb 16, 2018

@m52go See c008cc6

0reactions
m52gocommented, Feb 16, 2018

@katzer omg it’s perfect! you made my WEEK sir!! sending you an email at contact at appplant.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - How to prevent notification bar from closing upon ...
In my app i have notification with pause/play action, however, when user clicks on the action, notification bar is closing.
Read more >
Action Center keeps popping up - Microsoft Community
Is there any way to disable Action Center is keeps popping out every time I move my mouse - even if there are...
Read more >
Start an Activity from a Notification - Android Developers
When you start an activity from a notification, you must preserve the user's expected navigation experience. Tapping Back should take the ...
Read more >
Control notifications on Android - Google Help
Snooze a notification · On your phone, open the Settings app. · Tap Notifications and then Wireless emergency alerts. · Choose how often...
Read more >
View and respond to notifications on iPhone - Apple Support
To view a notification and perform quick actions if the app offers them (on supported models): Touch and hold the notification. To open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found