You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
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).
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
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!
The text was updated successfully, but these errors were encountered: