summaryrefslogtreecommitdiff
path: root/android/app/src/main/res
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2021-10-15 17:14:48 +0100
committerrubenwardy <rw@rubenwardy.com>2021-10-18 18:12:03 +0100
commitc61d8cfb857bbc591ae87f662e0e6e67b813a5c4 (patch)
treedabe2aed3eb722eb1167e8dfef2911c26a4adc09 /android/app/src/main/res
parent27f4195471fbbac33b5cdc19025ec5aa6c118a75 (diff)
downloadminetest-c61d8cfb857bbc591ae87f662e0e6e67b813a5c4.tar.gz
minetest-c61d8cfb857bbc591ae87f662e0e6e67b813a5c4.tar.bz2
minetest-c61d8cfb857bbc591ae87f662e0e6e67b813a5c4.zip
Use scoped app storage on Android (#11466)
From November 2021, the Play Store will no longer be accepting apps which use the deprecated getExternalStorageDirectory() API. Therefore, this commit replaces uses of deprecated API with the new scoped API (`getExternalFilesDir()` and `getExternalCacheDir()`). It also provides a temporary migration to move user data from the shared external directory to new storage. Fixes #2097, #11417 and #11118
Diffstat (limited to 'android/app/src/main/res')
-rw-r--r--android/app/src/main/res/layout/activity_main.xml7
-rw-r--r--android/app/src/main/res/values/strings.xml3
2 files changed, 8 insertions, 2 deletions
diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml
index e6f461f14..93508c3cb 100644
--- a/android/app/src/main/res/layout/activity_main.xml
+++ b/android/app/src/main/res/layout/activity_main.xml
@@ -1,4 +1,5 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -14,7 +15,8 @@
android:layout_marginRight="90dp"
android:indeterminate="false"
android:max="100"
- android:visibility="gone" />
+ android:visibility="gone"
+ tools:visibility="visible" />
<TextView
android:id="@+id/textView"
@@ -25,6 +27,7 @@
android:background="@android:color/transparent"
android:text="@string/loading"
android:textColor="#FEFEFE"
- android:visibility="gone" />
+ android:visibility="gone"
+ tools:visibility="visible" />
</RelativeLayout>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index a6fba70d5..99f948c99 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -3,8 +3,11 @@
<string name="label">Minetest</string>
<string name="loading">Loading&#8230;</string>
+ <string name="migrating">Migrating save data from old install&#8230; (this may take a while)</string>
<string name="not_granted">Required permission wasn\'t granted, Minetest can\'t run without it</string>
<string name="notification_title">Loading Minetest</string>
<string name="notification_description">Less than 1 minute&#8230;</string>
+ <string name="ime_dialog_done">Done</string>
+ <string name="no_external_storage">External storage isn\'t available. If you use an SDCard, please reinsert it. Otherwise, try restarting your phone or contacting the Minetest developers</string>
</resources>