Skip to content

Commit 83f38ff

Browse files
committed
Kivy/Android:
- android-sdk update to 36 - android-ndk update to 28c - kivy update to 2.3.1 - fixed: externalStorage option for Android 11++
1 parent f0f03e4 commit 83f38ff

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

README.android

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ Additional user supplied data:
6767
NOTE:
6868
To be able to add additional resources to your app, you need to
6969
enable storage access in the android settings for the app. Go to
70-
Settings/Apps/PySolFC/Permissions.
70+
Settings/Apps/PySolFC/Permissions. As of Android 11++ the storage
71+
permissions may have been moved away from the 'Apps' settings into
72+
the 'Special permissions' settings screen.
7173

72-
Resources are stored in ~/.PySolFC/. On an android device this is
73-
equivalent to /sdcard/.PySolFC/.
74+
With these permissions enabled resources are then stored in ~/.PySolFC/.
75+
On an android device this is equivalent to /sdcard/.PySolFC/.
7476

7577
Additional cardsets can be installed in ~/.PySolFC/cardsets/.
7678
Important: Cardsets must use the 'png' image format. Use

buildozer/buildozer.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ android.permissions = WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE
103103
#android.features = android.hardware.usb.host
104104

105105
# (int) Target Android API, should be as high as possible.
106-
android.api = 34
106+
android.api = 36
107107

108108
# (int) Minimum API your APK / AAB will support.
109109
#android.minapi = 21
@@ -112,7 +112,7 @@ android.api = 34
112112
#android.sdk = 20
113113

114114
# (str) Android NDK version to use
115-
#android.ndk = 23b
115+
android.ndk = 28c
116116

117117
# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
118118
#android.ndk_api = 21

buildozer/helpers/setbuildvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
VP4A='c63d8e2a91ce7180811a37eae489f772fb766a9d'
3+
VP4A=$(cat buildozer.spec | grep -e "^p4a[.]commit" | sed -E "s/.*= *([0-9,A-F,a-f]*).*/\1/")
44
VBUILDOZER='3ebc09e885457db4747e67a1250c2aea1ca7a046'
55
VCPYTHON='v3.11.5'
66
VCYTHON='3.0.10'

buildozer/pipreq.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
attrs==23.2.0
22
build==1.2.1
3-
-e git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer
3+
git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer
44
certifi==2024.2.2
55
colorama==0.4.6
66
configobj==5.0.8
7-
Kivy==2.3.0
7+
Kivy==2.3.1
88
pip==24.0
99
pysol_cards==0.16.0
1010
setuptools==69.1.1

pysollib/kivy/androidperms.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self):
3030
self.build = jnius.autoclass("android.os.Build")
3131
self.version = jnius.autoclass("android.os.Build$VERSION")
3232
self.vcodes = jnius.autoclass("android.os.Build$VERSION_CODES")
33+
self.environment = jnius.autoclass("android.os.Environment")
3334

3435
def getPerm(self, permission):
3536
if jnius is None:
@@ -42,8 +43,11 @@ def getPerms(self, permissions):
4243
if jnius is None:
4344
return True
4445
haveperms = True
45-
for perm in permissions:
46-
haveperms = haveperms and self.getPerm(perm)
46+
if self.version.SDK_INT > 29:
47+
haveperms = self.environment.isExternalStorageManager();
48+
else:
49+
for perm in permissions:
50+
haveperms = haveperms and self.getPerm(perm)
4751
return haveperms
4852

4953
# invoke the permissions dialog

0 commit comments

Comments
 (0)