question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to check permission without requesting it ?

See original GitHub issue

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…

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
m0dch3ncommented, Jun 17, 2019

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 ?

0reactions
m0dch3ncommented, Jul 2, 2019

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request app permissions - Android Developers
Transferring data without draining the battery ... Request permission to access nearby Wi-Fi devices · Wi-Fi scanning overview · Wi-Fi peer-to-peer ...
Read more >
How to Request Permissions in Android Application?
Steps for Requesting permissions at run time. Step 1: Declare the permission in the Android Manifest file: In Android, permissions are declared ...
Read more >
Android M - check runtime permission - how to determine if the ...
You can determine it by checking if permission rationale is to be shown inside the onRequestPermissionsResult() callback method.
Read more >
Android Runtime Permissions Example - DigitalOcean
From Android 6.0 only dangerous permissions are checked at runtime, normal permissions are not. An example of a normal permission is android.
Read more >
Method to detect if user has selected “Don't Ask Again” while ...
A boolean value is maintained in SharedPreferences , when user has denied permission for the first time. Before the permission is requested ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found