Unable to Write to Android Removable Storage in Python

社会主义新天地 提交于 2021-01-29 13:54:40

问题


So let me start by telling you what works...

in the Buildozer Spec File I have: android.permissions = WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, INTERNET

and in my code I have: from android.permissions import request_permissions from android.permissions import Permission request_permissions([Permission.WRITE_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE])

When I run the app for the first time it asks me (as a user) to grant permission to access storage.

On the Samsung Tablet I'm running AndroidOS 7.1.1 I can now create Folders on the INTERNAL memory and copy files to the Internal Memory (which is also referred to as external sd memory also for some reason.) But I can NOT create a folder on my removable SD card. Why?

Same on my Amazon Fire Tablet HD10 9thGen running FireOS 7.3.1.6

But on my Phone running AndroidOS 10.0 I am unable to create a folder or write files to any directory outside of my private app related folder in the root directory that I don't have access to. But I think I know why. Because of the new rules. Which I still haven't figured out yet how to grant permissions yet.

But I think first I would like to solve the problem of why I can write to my internal sd memory on AndroidOS 7.1.1 after permission is granted but WHY I am denied the ability to write to the removable sd memory. Like I stated above all permissions have been coded and granted. So what am I missing?

来源:https://stackoverflow.com/questions/65043494/unable-to-write-to-android-removable-storage-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!