Local notification onclick issue
See original GitHub issueHi thanks for this great plugin… i have installed the local notification by command line and all work perfectly i received the notification but i cant make a redirection to a specific page when i clicked on the notification it redirect me to the current page instead of my specific page this my code
$.ajax({
type: "POST",
url: "http://******/~my/path/send_filter.php",
data:
"&classes="+all_classes+
"&states="+all_states+
"&titres="+all_titres+
"&autheurs="+all_autheur+
"&id="+id,
dataType: "json",
cache: false,
beforeSend: function(){ $("#send_filter").val('Enregistrement...');},
success: function(data) {
if(data)
{
if (data.msg=="ok") {
$("#send_filter").val('ok');
var id = window.localStorage.getItem('id');
var url = "http://*****/~mypath/my path/get_notify_alerts.php?id="+id;
document.addEventListener('deviceready', function () {
$.getJSON(url,function(json){
id_notify = json.notify.id;
updater = json.notify.date;
msg_alert = "Resultat d'Alert de filtre";
window.plugin.notification.local.add({
id: "1",
title: "TM",
message: msg_alert,
});
});
window.plugin.notification.local.onclick = function (id, state, json)
{
location.href="index.html";
};
});
};
Issue Analytics
- State:
- Created 9 years ago
- Comments:21 (6 by maintainers)
Top Results From Across the Web
Not able to set Ionic Local Notification On Click Event (weird ...
Here is my full home.ts code: Note- I am calling the submit function from home.html. Notifications are working perfectly and triggered on time....
Read more >Local notification onclick not called - Ionic Forum
I am using the local notification plugin ... window.plugin.notification.local.onclick works fine if I stay on the same page, ...
Read more >Notification: click event - Web APIs - MDN Web Docs - Mozilla
The click event of the Notification interface fires when the user clicks on displayed Notification.
Read more >Create a Notification - Android Developers
Notifications provide short, timely information about events in your app while it's not in use. This page teaches you how to create a...
Read more >925892 - Clicking on local notification in notification ... - Monorail
Steps to reproduce the problem: 1. Receive 2+ local notifications. Correct behaviour when: 2. From the action centre, click on the most recent...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not working for me also when click on notification. Is there any solution?
@OctoberCat I tested in ios and click is not calling the callback, check my code: