Comments (6)
I have checked myself and its working...
Maybe check that you are calling onNotification inside the onDeviceReady event handler
from cordova-plugin-fcm.
I double checked it and I'm calling it directly in document.addEventListener('deviceready', function() { ...
It works great when the app is in the foreground. I'm running Android 5.0.1 on an S4 with latest Cordova.
I get the success messages on the console too:
I/chromium(32319): [INFO:CONSOLE(5)] "FCMPlugin.js: is created", source: file:///android_asset/www/plugins/cordova-plugin-fcm/www/FCMPlugin.js (5)
I/chromium(32319): [INFO:CONSOLE(29)] "FCMPlugin Ready OK", source: file:///android_asset/www/plugins/cordova-plugin-fcm/www/FCMPlugin.js (29)
I/chromium(32319): [INFO:CONSOLE(10464)] "Cordova deviceready", source: file:///android_asset/www/js/app.js (10464)
I/chromium(32319): [INFO:CONSOLE(10464)] "fcm success!!", source: file:///android_asset/www/js/app.js (10464)
But no callback to the alert function, ever.
from cordova-plugin-fcm.
Make sure you are including:
"click_action":"FCM_PLUGIN_ACTIVITY",
and at least one data parameter in your payload
from cordova-plugin-fcm.
Worked like a charm. Thanks for the support!
from cordova-plugin-fcm.
I implemented the "click_action":"FCM_PLUGIN_ACTIVITY" fix and can redirect to the desired $state
using UI-router if my app is in the background. But if the app is closed it only opens it to the $urlRouterProvider.otherwise()
default state. How can I catch the app being opened from cold start by a click_action
?
from cordova-plugin-fcm.
I implemented the "click_action":"FCM_PLUGIN_ACTIVITY" fix and can redirect to the desired
$state
using UI-router if my app is in the background. But if the app is closed it only opens it to the$urlRouterProvider.otherwise()
default state. How can I catch the app being opened from cold start by aclick_action
?
Have you got a solution yet. Similar situation I am facing now. When app is closed or killed notification is coming but if I tap the notification then it only opens the first page. But I want to redirect to other page by clicking the notification.
from cordova-plugin-fcm.
Related Issues (20)
- View not ready. SAVED NOTIFICATION
- Duplicate Notification on background or closed state
- Simple "cordova plugin add" not working HOT 2
- Cannot add task ':processArmv8DebugGoogleServices' as a task with that name already exists.
- not showing icon android 1 HOT 1
- Android app download from play store can't open, It show keep stopping
- Build error !! - Add FIRApp configure.
- FCM is not defined
- Plugin not working when iOS app is in foreground HOT 2
- Cocoapods and XCode HOT 1
- iOS: Provisioning profile "Demo Development" doesn't support the Push Notifications capability
- Error with xcode 12
- Use of Firebase Messaging iOS Direct Channel API? HOT 1
- getToken not working in ios HOT 1
- m id
- index.js - Hello World
- Plugin is not working in AndroidX version HOT 1
- MISSING_INSTANCEID_SERVICE com.gae.scaffolder.plugin.FCMPlugin$1.onComplete
- How to get FCM token in Cordova ?
- The mutability of each PendingIntent object is required for all apps targeting Android 12 or newer (API level 31)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-fcm.