Android profile export and download not working in some cases (PERMISSIONS) #512

Closed
opened 2022-07-15 16:10:46 +00:00 by dan · 3 comments
Owner

from user:

The profile export and also the download of files from conversations did only create empty files.
It looks like the Cwtch App did not request the correct permissions under Android 11. It did only request the READSTORAGE but not the WRITESTORAGE.
Therefore Cwtch is able to create for storing data for example a new directory inside the default download folder but at the default location and aldo at the newly created subfolder the filey are always empty (size 0).
Cwtch would probably need the "all files access" in order to store the files. 
READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE

https://developer.android.com/about/versions/11/privacy/storage#all-files-access

needs investigation but if we aren't asking for those perms on start up (correct behaviour) then we need to ask when we do the export

from user: >The profile export and also the download of files from conversations did only create empty files. It looks like the Cwtch App did not request the correct permissions under Android 11. It did only request the READSTORAGE but not the WRITESTORAGE. Therefore Cwtch is able to create for storing data for example a new directory inside the default download folder but at the default location and aldo at the newly created subfolder the filey are always empty (size 0). Cwtch would probably need the "all files access" in order to store the files.  >READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE https://developer.android.com/about/versions/11/privacy/storage#all-files-access needs investigation but if we aren't asking for those perms on start up (correct behaviour) then we need to ask when we do the export
dan added the
bug
android
labels 2022-07-15 16:10:46 +00:00
dan self-assigned this 2022-07-15 16:10:46 +00:00
dan added this to the Cwtch Beta (In Progress) project 2022-07-15 16:10:46 +00:00
dan changed title from Android profile export not working in some cases to Android profile export and download not working in some cases (PERMISSIONS) 2022-08-20 16:59:20 +00:00
Author
Owner

https://developer.android.com/about/versions/11/privacy/storage#all-files-access

The majority of apps that require shared storage access can follow the best practices for sharing media files and sharing non-media files. However, some apps have a core use case that requires broad access of files on a device, but cannot do so efficiently using the privacy-friendly storage best practices.

https://developer.android.com/training/data-storage/use-cases#share-media-all

I think we don't want to add full read/write permissions to the app, it's an over ask, might deter some folk (rightly so), so we need to sit down and do the harder API integration

https://developer.android.com/about/versions/11/privacy/storage#all-files-access > The majority of apps that require shared storage access can follow the best practices for sharing media files and sharing non-media files. However, some apps have a core use case that requires broad access of files on a device, but cannot do so efficiently using the privacy-friendly storage best practices. https://developer.android.com/training/data-storage/use-cases#share-media-all I think we don't want to add full read/write permissions to the app, it's an over ask, might deter some folk (rightly so), so we need to sit down and do the harder API integration

I agree, full read/write permission on shared (external) storage would be too much.
But since in Android 11 the scoped storage is mandatory the file access has to be modified.
The access should be done with the File Path API (or the MediaStore APIs).

Storage access with Android 11

I agree, full read/write permission on shared (external) storage would be too much. But since in Android 11 the scoped storage is mandatory the file access has to be modified. The access should be done with the File Path API (or the MediaStore APIs). [Storage access with Android 11](https://www.youtube.com/watch?v=RjyYCUW-9tY)
sarah added the
cwtch-beta-1.10
label 2022-11-23 16:26:38 +00:00
sarah added this to the Fix Android milestone 2022-11-28 20:35:15 +00:00
sarah referenced this issue from a commit 2022-11-28 21:36:06 +00:00
Owner

#579 should fix this. Looks like this wasn't permission related (we were using the create file intent that is now standard, and is also used to export media from cwtch). The issue was that cwtch.exportProfile wasnn't getting called as so nothing was nothing to copy.

#579 should fix this. Looks like this wasn't permission related (we were using the create file intent that is now standard, and is also used to export media from cwtch). The issue was that cwtch.exportProfile wasnn't getting called as so nothing was nothing to copy.
dan closed this issue 2022-11-29 22:14:35 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#512
No description provided.