You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(android): add native storage permission check and blocking UI
- Add MANAGE_EXTERNAL_STORAGE permission to AndroidManifest
- Create native blocking UI in activity_main.xml (hides WebView until granted)
- Implement permission check logic in MainActivity.kt
- Add explanatory text about why file access is needed for web-based app
Copy file name to clipboardExpand all lines: app/src/main/res/layout/activity_main.xml
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,4 +17,40 @@
17
17
android:indeterminateTint="@color/primary"
18
18
android:visibility="gone" />
19
19
20
+
<LinearLayout
21
+
android:id="@+id/permission_layout"
22
+
android:layout_width="match_parent"
23
+
android:layout_height="match_parent"
24
+
android:orientation="vertical"
25
+
android:gravity="center"
26
+
android:padding="24dp"
27
+
android:background="@color/background"
28
+
android:visibility="gone">
29
+
30
+
<TextView
31
+
android:layout_width="wrap_content"
32
+
android:layout_height="wrap_content"
33
+
android:text="Storage Permission Required"
34
+
android:textSize="24sp"
35
+
android:textStyle="bold"
36
+
android:textColor="@color/on_background"
37
+
android:layout_marginBottom="16dp" />
38
+
39
+
<TextView
40
+
android:layout_width="wrap_content"
41
+
android:layout_height="wrap_content"
42
+
android:text="This app is built on web technologies and requires full file access to load local resources and function correctly.\n\nWithout this permission, the app cannot access its core files due to Android's storage restrictions."
0 commit comments