You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Action[] actions = options.getActions();
if (actions != null && actions.length > 0 ) {
// if actions are defined, the user must click on button actions to launch the app.
// Don't make the notification clickable in this case
return;
}
But did not add any reason. Is it possible to have that functionality controlled by an option (e.g. "make_unclickable_if_actions") instead?
Because a lot of other apps (e.g. SMS app/gmail) support both functionality - the notification will show some text and a couple of buttons (Mark Read and/or Delete).
Clicking on the action will launch the app and perform the action
Clicking on the notification will launch the app without performing the action
Although it's not required, it's a good practice for every notification to open an appropriate app activity when it's tapped. In addition to this default notification action, you can add action buttons that complete an app-related task from the notification—often without opening an activity—as shown in figure 8.
Your Environment
Plugin version: 0.1.4
Platform: android
OS version: all
Device manufacturer / model: all
Cordova version (cordova -v): 11.1.0
Cordova platform version (cordova platform ls): android 11.0.0
Plugin config
Ionic Version (if using Ionic) ionic1
Expected Behavior
we should be able to configure our notification to support both clicks and actions
Actual Behavior
if actions are configured, clicks are disabled
Steps to Reproduce
Create a notification with actions.
Click on the notification
Nothing happens
Context
Get a notification to work both with clicks and actions
Debug logs
Please see link to code above
The text was updated successfully, but these errors were encountered:
… present
In bhandaribhumin@0b6aefe,
the plugin started ignoring regular clicks when actions are present.
```
Action[] actions = options.getActions();
if (actions != null && actions.length > 0 ) {
// if actions are defined, the user must click on button actions to launch the app.
// Don't make the notification clickable in this case
return;
}
```
It is not clear why this was done. I have filed
bhandaribhumin#9
but not received any response
While waiting for it to be fixed in the main repo, commenting out that code in
a fork so that we can unblock out project.
The plugin does makes the notification non-clickable if actions are defined.
This is by design.
0b6aefe
added in the following code
cordova-plugin-local-notification-12/src/android/notification/Builder.java
Line 407 in 17826ea
But did not add any reason. Is it possible to have that functionality controlled by an option (e.g. "make_unclickable_if_actions") instead?
Because a lot of other apps (e.g. SMS app/gmail) support both functionality - the notification will show some text and a couple of buttons (Mark Read and/or Delete).
In fact, the android notification docs say (note the in addition to)
Your Environment
cordova -v
): 11.1.0cordova platform ls
): android 11.0.0Expected Behavior
we should be able to configure our notification to support both clicks and actions
Actual Behavior
if actions are configured, clicks are disabled
Steps to Reproduce
Context
Debug logs
Please see link to code above
The text was updated successfully, but these errors were encountered: