This is a rebased version of !522, with the same key changes.
* `PairingFragment` and `SystemVolumeFragment` are now written in Kotlin
* A new `BaseFragment` defines a common 'binding' property for `AboutFragment`,
`DeviceFragment`, `PairingFragment`, and `SystemVolumeFragment`
* Calls in and out of `Intent`s and `Bundle`s for `Parcelable` values now go through `IntentCompat` and `BundleCompat`
- Solved serialization issue when commas were used
- Validate hosts and show toast message if host is invalid
- Show whether device can be reached over the network
- Show toast message when host already exists
- Code TODO's (including sorting device list)
We had a mix of specific colors and theme-based Material You colors.
This aims to remove any hardcoded color so the app only uses the colors
from the current theme.
## Summary
This contains some minor code quality improvements in
`RunCommandControlsProviderService`, as well as the following feature changes:
* If the device for a Device Control is reachable, clicking on the secondary
space of the control will launch RunCommandActivity. If the device isn't
reachable, we launch the MainActivity like usual.
* Pixel 7 and other modern Google devices can now show KDE Connect commands
in the 'Home' quick access tile (you still have to 'add app')
## Test Plan
0. Make sure your Android OS supports Device Controls (Android 11+)
1. Choose a paired device to work with
2. Place at least one command in the Run Command list
3. Enable the command in the Device Controls screen
4. Test what happens when you click on the secondary space of the control
Starting next month (September 2023) it will be required to target
Android 13 to publish to the Play Store.
On Android 13, we need to request the POST_NOTIFICATIONS permission.
This change adds the permission as required/optional to the plugins
that do create notifications. It also adds a popup to request it the
first time you open the app.
Allows navigating the app using the arrow keys on a keyboard or the
D-pad on a TV remote, up until the plugin list (I haven't checked
specific plugins).
The Presenter activity including its layout file and related Java class were replaced with Compose UI.
Additionally, the androidx.compose.material3:material3 was updated from version 1.1.0 to version 1.1.1.
Apply Material3 to dialogs, image buttons, switches and preferences.
Merge the landscape and portrait layouts for the MPRIS controls.
Move setting theme to application start instead of applying to every activity.
- Add Monet dynamic colors on the app's `onCreate()`
- Set parent in styles.xml to `Theme.Material3.DayNight.NoActionBar`
- Use `MaterialAlertDialogBuilder`
- In the About and About KDE fragments, it uses the M3 elevated style instead of outlines
- In `edit_text_alert_dialog_view.xml`, it uses the default theme style instead of specifying the one from MaterialComponents
- Added a todo in the settings fragment: Preference dialogs don't yet use the M3 style.
It complements https://invent.kde.org/network/kdeconnect-android/-/merge_requests/273, though the way that merge request accomplishes color theming is the one from before the onCreate dynamics color method
Added a screen to allow users to compose the key strokes to send. This is necessary because the keyboard that appears on the mouse pad screen does not have the voice to text microphone button on my phone. Even if it could be made to appear as it does on my tablet, some kind of text buffering is necessary because the voice text will change its mind.
## Summary
A basic mouse receiver implementation. You can now control your Android Device remotely which might be useful when it's connected to a bigger screen (via HDMI).
Unfortunately Android does not provide moving mouse by software (other than adb and without root). Therefore this implementation uses Android [AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService) to create an ImageView Overlay as mouse pointer and simulate touch gestures.
This is quite hacky but I think the best way to do so.
## Demo
Here is a small demo

Changes:
1. Add toolbar
2. Add device icons
3. Fix unexpected on-screen keyboard popping up when starting an activity on some Android versions
4. The distance between the device list and the text box has been reduced