Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

Mobile app and CI hardening (PR 2043)

Tim Gutberlet04a6514d0a1c
diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml
index aa1eac6f..f5c8456d 100644
--- a/apps/mobile/android/app/src/main/AndroidManifest.xml
+++ b/apps/mobile/android/app/src/main/AndroidManifest.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
- android:allowBackup="true"
+ android:allowBackup="false"
+ android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
diff --git a/apps/mobile/android/app/src/main/res/xml/data_extraction_rules.xml b/apps/mobile/android/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 00000000..13ae7187
--- /dev/null
+++ b/apps/mobile/android/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Android 12+: the session cookie and the local store stay on the device (no cloud backup, no device transfer). -->
+<data-extraction-rules>
+ <cloud-backup>
+ <exclude domain="root" path="." />
+ <exclude domain="file" path="." />
+ <exclude domain="database" path="." />
+ <exclude domain="sharedpref" path="." />
+ <exclude domain="external" path="." />
+ </cloud-backup>
+ <device-transfer>
+ <exclude domain="root" path="." />
+ <exclude domain="file" path="." />
+ <exclude domain="database" path="." />
+ <exclude domain="sharedpref" path="." />
+ <exclude domain="external" path="." />
+ </device-transfer>
+</data-extraction-rules>
diff --git a/apps/mobile/android/app/src/main/res/xml/file_paths.xml b/apps/mobile/android/app/src/main/res/xml/file_paths.xml
index bd0c4d80..26a83317 100644
--- a/apps/mobile/android/app/src/main/res/xml/file_paths.xml
+++ b/apps/mobile/android/app/src/main/res/xml/file_paths.xml
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
- <external-path name="my_images" path="." />
+ <!-- Only the photo a file input takes with the camera (Capacitor's BridgeWebChromeClient writes it to
+ getExternalFilesDir(Pictures)); not the whole shared storage. -->
+ <external-files-path name="my_images" path="Pictures/" />
<cache-path name="my_cache_images" path="." />
</paths>
\ No newline at end of file