Commit aae40e9
authored
[auth] Add Android Quick Settings tile to launch the app (#7831)
Users can now add a Quick Settings tile to quickly launch the app. This
provides a convenient shortcut to access 2FA codes without searching for
the app on the home screen or app drawer.
Changes:
- Android: Added QuickTileService to the manifest.
- Android: Implemented QuickTileService, the tile launches the main
activity.
- Android: Included a monochrome icon for the tile.
## Description
This PR introduces a Quick Settings tile on Android to launch the Ente
Auth app.
The following changes have been made:
- **AndroidManifest.xml** Registered the new QuickTileService.
- **QuickTileService.kt** Implemented the service that handles the
tile's onClick event, which launches the MainActivity. The
implementation handles the deprecated startActivityAndCollapse for
backward compatibility.
- **drawable/ic_qs_monochrome.xml** Added a monochrome icon for the
tile, as required for the Quick Settings panel.
Related discussion #1026
## Tests
Physical Device and emulator on Android 16 (SDK 36)
Result: The tile is correctly displayed and launches the app
successfully.
Emulator: Android 5.0 (SDK 21)
Result: This test was performed to ensure backward compatibility on
Android versions below API 24 (which do not support Quick Settings
tiles). The app runs without any crashes or issues. The new code is
correctly bypassed on older versions.
https://github.com/user-attachments/assets/1b804753-907d-4b0f-a978-b66d1fa97f64File tree
3 files changed
+59
-0
lines changed- mobile/apps/auth/android/app/src/main
- kotlin/io/ente/authenticator
- res/drawable
3 files changed
+59
-0
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments