Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate automatic property for "Radio($radio)" #782

Merged
merged 2 commits into from
Apr 11, 2022
Merged

Conversation

zihejia
Copy link
Collaborator

@zihejia zihejia commented Apr 9, 2022

Fix the warning: "Permission READ_PHONE_STATE not granted. Property $radio will not be available."

Since we now have targetSdkVersion as 30. To get the Radio value(3G, 4G, LTE, etc), the permission READ_PHONE_STATE is required which is considered "dangerous" after targetSdkVersion 23. Now, for users on Android 6+, runtime permissions are required. Therefore, we no longer provide this property automatically. You can check more details in this doc from Google.

If you still need it, you can use methods like checkSelfPermission() and requestPermissions() to ask users and set the "$radio" property by yourself.

@zihejia zihejia added the bug label Apr 9, 2022
Copy link
Collaborator

@jaredmixpanel jaredmixpanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zihejia zihejia merged commit 659a852 into master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants