cordova-plugin-firebase-messaging
cordova-plugin-firebase-messaging copied to clipboard
How to check permission without requesting it ?
Before I used the cordova-plugin-firebase
plugin from arnesson, where the following method existed
https://github.com/arnesson/cordova-plugin-firebase/blob/master/docs/API.md#haspermission
How can I do this, with your plugin ? My intent is, to first check if the user has given the permission, and if not, I first want explain why I'll ask for it, before I gonna request...
You can do it with Cordova diagnostic plugin
You can do it with Cordova diagnostic plugin
looks nice, and thanks for the tip!
But maybe this is a little bit an overkill, to integrate a whole plugin with so many features, for just a small check. If I don't need all the rest, this will unnecessary increase the size of my app.
Anyway let's see what @chemerisuk has to say about this ?
I don't feel this method is often needed. iOS provides a way to customize text in permission dialog where you can explain why. To show a different kind of screen at the first time - use a persistable flag.
I am currently switching over to this plugin from cordova-plugin-firebase as well, and need this method as part of a complex authentication process on startup. Is there another way to check?
@WolftechBroadcastSolutions
As I also have local notifications, I used this plugin with the method hasPermission
It better fits my requirements, without bloating the app bundle too much with the diagnostic plugin.
But IMHO it would be better, if cordova-plugin-firebase-messaging
would also be able to allow us to check, without requesting for it.
Unfortunately, I don't have any iPhone Dev knowlegde, so I'm unable to implement this natively as proposed by @chemerisuk