Comments (10)
@martinfilliau You are not wrong. In fact I remember reading this article and referencing it as best practices during one of my presentations. I will look into fixing it for the 1.2.0 release.
from phonegap-plugin-push.
I was also wondering, because I was heavily investing of delaying the init calls, just to find out that the permissions are directly asked for.
So big +1 for this.
from phonegap-plugin-push.
@martinfilliau can you give me a bare bones .js file that reproduces the problem because I can't. If I put the code that calls PushNotification.init() in an onClick handler of a button then I don't get the pop up dialog until I actually click the button. So it is working as I'd expect it.
You can see my gist here: https://gist.github.com/macdonst/6675af8186c9a6468f25
from phonegap-plugin-push.
@macdonst sorry for long delay in answer.
I have just used your gist and the plugin version 1.1.1
and I am being asked about allowing push notifications before clicking on the "GO" button (which refers to mybutton
in your index.js
). The dialog appears just after the app starts.
We use Phonegap Build and the only plugins installed are:
<gap:plugin name="org.apache.cordova.statusbar" version="0.1.10" source="plugins.cordova.io"/
<gap:plugin name="phonegap-plugin-push" source="npm" version="1.1.1" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.0.0" />
I had resetted my push notification settings using the procedure as described in https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42
I have an iPhone 5S running iOS 8.4.1.
from phonegap-plugin-push.
+1
I can't migrate from PushPlugin until this is resolved
from phonegap-plugin-push.
@ptarjan Can you reproduce the issue as well? I have not been able to so I can't fix it until I can. I'm surprised that it works differently than the old PushPlugin because same code base.
from phonegap-plugin-push.
@macdonst I didn't repo it, I just saw the issue and decided not to migrate. I'll try to migrate again when I get some time.
from phonegap-plugin-push.
@ptarjan have you been able to test this plugin regarding this issue?
from phonegap-plugin-push.
@martinfilliau thanks for cycling back to me. Yes, I have migrated and the dialog appears in the right place. Mark as resolved please.
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.