Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Check permissions #58

Closed
1gravity opened this issue Mar 17, 2016 · 2 comments
Closed

Check permissions #58

1gravity opened this issue Mar 17, 2016 · 2 comments

Comments

@1gravity
Copy link

Can your library check the permissions it needs to run and throw an exception if the permissions aren't granted?
I just spent a lot of time because one of my Gradle flavors had
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove"/>
in its manifest and I didn't remember any more (that's my fault of course).
As a consequence the token could not be refreshed and the app simply stopped doing anything (log output stopped when it says it's going to refresh the token).

You can check the permissions using this e.g.:
http://developer.android.com/reference/android/support/v4/content/ContextCompat.html#checkSelfPermission(android.content.Context, java.lang.String)

Thank you!

@peternied
Copy link
Contributor

We would be happy to accept a pull request that handles this kind of permissions check, if you'd like an example of an existing permission check this class would serve a great starting point

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants