Ask user to grant INTERNET permission to app if needed #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an starting point of the implementation.
Currently, there's no way to determine if the target Android app has the
android.permission.INTERNET
granted.Since
android.permission.INTERNET
is a normal permission, it must be declared at install time (https://developer.android.com/training/permissions/declaring). Therefore, we cannot modify it at runtime.The current solution checks if
android.permission.INTERNET
is granted. If not, it returns an error message asking the user to add this permission in the AndroidManifest.xml file.Remember we need
android.permission.INTERNET
granted to use the gRPC service. On the other hand, since Android 11 we don't need to grant the android.permission.WRITE_EXTERNAL_STORAGE, It is depreciated. For future needs we can use `MANAGE_EXTERNAL_STORAGE. to access specific files.