-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
chore(#324): upgrading to android 13 #325
Conversation
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
trace(this, "RequestStoragePermissionActivity :: READ_EXTERNAL_STORAGE permission is ignored in Android 13+."); | ||
setResult(RESULT_OK, createResponseIntent()); | ||
finish(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case if someone is wondering
You can call finish() from within this function, in which case onDestroy() will be immediately called after onCreate(Bundle)
@@ -46,6 +46,7 @@ | |||
import java.util.stream.IntStream; | |||
|
|||
@RunWith(RobolectricTestRunner.class) | |||
@Config(sdk = 31) // ToDo: Remove when upgrading robolectric |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting this error because our current version of robolectric
doesn't support target 33
java.lang.IllegalArgumentException at RobolectricTestRunner.java:260
Caused by: java.lang.IllegalArgumentException at DefaultSdkPicker.java:118
In this link, they recommend to use Config(sdk = 31)
to make the test pass as a temporary fix.
@garethbowen, it turns out that our version of Knowing that we have limited time before PlayStore blocks our apps, I've dropped the work on the tests and patch them by running them in target 31. I created a separate ticket to fix the dependencies. Then @ngaruko and I can focus on testing. My question is: If the manual testing is good, can we release this to unblock the PlayStore and work on the dependencies later? |
@latin-panda Yes let's go manual to unblock this - incomplete testing is better than blocking publishing altogether. But let's make sure we fix this soon - if you don't have time to take this on let me know and I'll shop it around. Thanks for doing such a deep dive here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Test most critical scenarios and they all passed
- Random testing of a few workflows
- Reading from Google developer, one of the major changes around permissions is replacing
[READ_EXTERNAL_STORAGE](https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE)
by granular media permission. Apparently we removed the permission and don't seem to have introduced any granular permission. Is that intentional @latin-panda ?
@ngaruko I saw that, but I'm not clear under what circumstances it's needed; for example, they don't mention anything about the other types of files that aren't images, video, or audio, such as pdf or spreadsheets, and that we were accessing using
In another topic:
|
Continuing with @ngaruko's point # 3... I did a lot of reading to understand why we can access files in Android 13 without requesting granular permission for media. This is what I found as possible reasons: Reason # 1: The app was upgraded where it had previously granted access.
Source (last paragraph of that section) Test: I did a fresh installation, so the app has no permission assigned. ![]() Result: I can still access the files using the picker from an Eketo form. Reason # 2: We've selected files in our app's folder or the download folder
Test: I tried picking files not in the download or cht folders. Result: I can still access the files using the picker from an Eketo form. Reason # 3: We're using the system's default picker![]() Source Test: I tried picking files made by other apps (WhatsApp, Google Docs, etc.) Result: I can still access the files using the picker from an Eketo form. If I'm interpreting this correctly, the main reason why we can still pick files without having granular permissions is that we are using the system's default picker. So, the user has control over file privacy. Why just not ask for these permissionsReading the Android docs, they don't recommend asking for permissions that the app isn't using. In our experience, asking for permission makes things more complex with Playstore. They are quite picky and it turns out like asking for access to review the app, asking for clear terms and conditions for app usage, etc. @garethbowen @ngaruko I did a lot of testing on this storage permission topic and didn't spot any issue accessing images, audio, videos and other files like pdf. |
@latin-panda I don't have a lot of android experience either but I think your "reason 3" is spot on. Thanks for being so diligent! |
@ngaruko waiting for your approval or feedback after you've done verifying the app |
@latin-panda . Thanks for all the research. It all makes sense and practically, I do not see any scenario where access is denied due to the permission not present. So, good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good research on those permissions. 👍
Description
This is to upgrade from Android 11 to Android 13.
#324