Comments (9)
@macdonst Thanks. It works nicely with phonegap build.
Just to benefit anyone who has the same issue and ends up here. What I did wrong was that I should manually bootstrap Angular in the "deviceready" callback, like this:
angular.module("myApp", [ ... ]);
angular.element(document).ready(function () {
if (window.cordova) {
document.addEventListener('deviceready', function () {
angular.bootstrap(document, ['myApp']);
}, false);
} else {
angular.bootstrap(document, ['myApp']);
}
});
And the "ng-app" tag need to be removed from the index.html to prevent auto bootstrap.
from phonegap-plugin-push.
@FernandoMedin that's not the correct plugin ID. The plugin ID for this package is "phonegap-plugin-push". If you are running the PhoneGap 5.0 command line then doing a:
phonegap pluging add phonegap-plugin-push
it will setup your config.xml for you. Let me know if this doesn't resolve things for you.
from phonegap-plugin-push.
@macdonst thanks for the reply! But, I'm getting the same error. I just tested using phonegap-build. Should I use the command line to build the app?
At this time I just ran the command line in a new project and edit index.js to put the "Try".
Thanks.
from phonegap-plugin-push.
@FernandoMedin I don't think the plugin has been uploaded to PhoneGap Build. If you are using PhoneGap/Cordova CLI 5+ then:
phonegap create pushtest
phonegap platform add android
phonegap plugin add phonegap-plugin-push
// edit the html/js
phonegap run android
Substitue ios for android if you want to test iOS.
from phonegap-plugin-push.
@macdonst, that works! The problem was with phonegap build so. Anyway, thank you very much! Any ideia if the plugin will be available in phonegap build?
from phonegap-plugin-push.
@FernandoMedin I'm going to close this issue then as you have a work around. I'm off this week but putting in a few bug fixes as I have time. Hope to have the next version on PG Build be early next week. I'll create an issue for it.
from phonegap-plugin-push.
Is this module in phonegap build yet? I have tried phonegap build and PushNotification is undefined.
from phonegap-plugin-push.
@gongfan99 https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PHONEGAP_BUILD.md
from phonegap-plugin-push.
This thread has been automatically locked.
from phonegap-plugin-push.
Related Issues (20)
- Callbacks (hasPermission, register) are not called on iOs 13 HOT 3
- @parmarkaushik15 yeah, like I said in my last comment, if the app is forced closed there is no web view in memory to run the JS. The best you can do at this point is look into using the force start parameter. HOT 1
- ios: notification event not firing after app is closed when user opens app directly - works on android HOT 1
- On notification event not firing when cordova local notification plugin is installed. HOT 5
- IOS. Does not show 'Allow / Deny' notification dialog and not receiving push notification
- Blank screen is displayed in few devices instead of picture
- iOS13 APNS Device Token HOT 2
- getNotificationSettingsWithCompletionHandler - completion handler never executes on iOS 9.3.5
- Incompatibilty phonegap-plugin-push whit cordova-plugin-googlemaps HOT 5
- Unable to send push to browser(Firefox, Chrome) using fcm/gcm getting 'InvalidRegistration'
- On Android it receives notifications but they don't appear on Firebase Analytics
- Not every key in the firebase's {android/ios}.notification object is supported in "additionalData" object
- Unable to compile 2.3.0
- HELP - Failed to install 'phonegap-plugin-push': undefined - cocoapods -macOs Catalina HOT 1
- registration is not called
- iOS: Can't process background notification on low battery
- Security Error with android:exported=true
- [Android] on('notification') 'coldstart' value is acting wacky and not as documented (works only on iOS)
- Sporadic registrations on iOS using Xcode
- FCM version is not up-to-date.
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 phonegap-plugin-push.