I gave read_storage permission

176 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Mohit Narwani

belum dibaca,
18 Jan 2023, 12.09.5918/01/23
kepadaKivy users support
01-18 22:36:18.547 15633 15678 I python  :  PermissionError: [Errno 13] Permission denied: '/storage/emulated/0/Download/devices.csv'
01-18 22:36:18.547 15633 15678 I python  : Python for android ended.


The code i used 
from kivy.utils import platform

if platform == "android":
    from android.permissions import request_permissions,Permission
   
    def call(permission,results):
        if all([res for res in results]):
            print("GOT ALL PERMISSIONS")
        else:
            print("did not get all permissions")
    request_permissions([Permission.READ_EXTERNAL_STORAGE])

Robert

belum dibaca,
18 Jan 2023, 14.52.1218/01/23
kepadaKivy users support

Mohit Narwani

belum dibaca,
18 Jan 2023, 15.08.4618/01/23
kepadakivy-...@googlegroups.com
So what permission do i need to give to make read Csv, text, json and db files from any part of the storage 

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/26881894-520a-4ac1-9d39-049372da287fn%40googlegroups.com.

Robert

belum dibaca,
18 Jan 2023, 18.07.0318/01/23
kepadaKivy users support
> from any part of the storage 
There are two different types of storage, they are not the same

Mohit Narwani

belum dibaca,
18 Jan 2023, 19.53.5218/01/23
kepadakivy-...@googlegroups.com
Yes sorry for confusion. I mean shared storage

Robert

belum dibaca,
18 Jan 2023, 20.21.3018/01/23
kepadaKivy users support
> So what permission do i need to give to make read Csv, text, json and db files
> I mean shared storage

You can't access Shared Storage using File operations, there is a package that allows you to copy to/from Shared Storage.
Read the Shared Storage section in the docs.

For permissions, it depends on the build api  (and for reading which app owns the file), you can read more in the last sub-section of the Stared Storage section of the link above.
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru