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
Copy file name to clipboardExpand all lines: docs/publish/android.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,59 @@ Configuring splash in `pyproject.toml`:
98
98
android = false
99
99
```
100
100
101
+
## Android SDK version settings
102
+
103
+
### `min_sdk_version`
104
+
105
+
* Defines the minimum Android version (API level) your app can run on.
106
+
* If a device has a lower version than `min_sdk_version`, your app won’t install or run on that device.
107
+
* Increasing this value means dropping support for older devices.
108
+
109
+
Configuring in `pyproject.toml`:
110
+
111
+
```toml
112
+
[tool.flet.android]
113
+
min_sdk_version = 21
114
+
```
115
+
116
+
If `min_sdk_version` = `21`, your app will not install on Android 4.4 (API 19) or lower.
117
+
118
+
Default is `21`.
119
+
120
+
### `target_sdk_version`
121
+
122
+
* Defines the Android version your app is optimized for.
123
+
* Your app can run on higher Android versions but will behave as if it’s running on `targetSdkVersion` unless explicitly adapted.
124
+
* Google Play requires you to update this regularly to meet new Android requirements.
125
+
126
+
Configuring in `pyproject.toml`:
127
+
128
+
```toml
129
+
[tool.flet.android]
130
+
target_sdk_version = 34
131
+
```
132
+
133
+
If `targetSdkVersion` = `34`, your app will run on Android 14 and above with the latest system behaviors. On newer Android versions, some strict security and API changes may apply automatically.
Boot screen is shown while the archive with Python app is being unpacked to a device file system.
216
+
It's shown after splash screen and before startup screen. App archive does not include 3rd-party site packages.
217
+
If the archive is small and its unpacking is fast you can keep that screen disabled (default).
218
+
219
+
To enable boot screen in `pyproject.toml` for all target platforms:
220
+
221
+
```toml
222
+
[tool.flet.app.boot_screen]
223
+
show = true
224
+
message = "Preparing the app for its first launch…"
225
+
```
226
+
227
+
Boot screen can be enabled for specific platforms only or its message customized. For example, enabling it for Android only:
228
+
229
+
```toml
230
+
[tool.flet.android.app.boot_screen]
231
+
show = true
232
+
```
233
+
234
+
## Startup screen
235
+
236
+
Startup screen is shown while the archive with 3rd-party site packages (Android only) is being unpacked and Python app is starting. Startup screen is shown after boot screen.
237
+
238
+
To enable startup screen in `pyproject.toml` for all target platforms:
239
+
240
+
```toml
241
+
[tool.flet.app.startup_screen]
242
+
show = true
243
+
message = "Starting up the app…"
244
+
```
245
+
246
+
Startup screen can be enabled for specific platforms only or its message customized. For example, enabling it for Android only:
247
+
248
+
```toml
249
+
[tool.flet.android.app.startup_screen]
250
+
show = true
251
+
```
252
+
213
253
## Entry point
214
254
215
255
By default, `flet build` command assumes `main.py` as the entry point of your Flet application, i.e. the file with `ft.app(main)` at the end. A different entry point could be specified with `--module-name` argument or in `pyproject.toml`:
0 commit comments