Plugins can opt-in to be loaded even when missing permissions, so they can
react if the user tries to remotely use the plugin for example to show an
error.
This is used in the SFTP plugin to display a message when trying to use it
without having granted filesystem permissions.
I also renamed the name of the plugin shown when missing permissions, from
"filesystem expose" to something hopefully more understandable.
When connected to a TV (running Plasma Bigscreen), Remote Input will show a TV remote and a button on the top to switch to mouse and keyboard. When connected to any other device, Remote Input will show the mouse and keyboard only.
**Removals:**
- [x] Remove BigscreenPlugin
**Additions:**
- [x] Add "Use mouse and keyboard"
**Changes:**
- [x] Plugin has both remote and mouse/keyboard if device is TV, just mouse/keyboard otherwise
**Code changes:**
- [x] Move all TV functions to MousePlugin

## Summary
Previously, URLs shared to offline targets via the ShareActivity were
delivered to them once they became online. This change extends this
behavior to direct share targets.
## Test Plan
Test 1
* Make sure a PC device is already paired with the phone. Let's say the name of this device is "PC".
* Make PC unreachable, e.g., close the KDE app on it.
* On the phone, open Chrome and share a couple of webpages to KDE's PC's direct share target.
* Open the KDE app on the PC.
* Observe that the webpages are opened on PC.
Test 2
* Make sure a PC device is already paired with the phone. Let's say the name of this device is "PC".
* Make PC unreachable, e.g., close the KDE app on it.
* On the phone, share a file to KDE's PC's direct share target.
* Open the KDE app on the PC.
* Observe that the file is sent to PC.
Test 3
* Make sure two PC devices are already paired with the phone. Let's say the name of these devices are "PC1" and "PC2".
* Make PC1 and PC2 unreachable, e.g., close the KDE app on them.
* On the phone, open Chrome and share a couple of webpages to KDE's PC1's direct share target.
* Open the KDE app on the PC2.
* Observe that the webpages are NOT opened on PC2.
* Open the KDE app on the PC1.
* Observe that the webpages are opened on PC1.
Test 4
* Make sure a PC device is already paired with the phone. Let's say the name of this device is "PC".
* Make PC reachable, e.g., have the KDE app open on it.
* Try to share a URL from the phone to the KDE's PC's direct share target.
* Observe that the URL opens instantly on the PC.
- 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)
This MR is a continuation of !439 , which changes the default
behavior of the remote mouse plugin's drag and drop trigger
to be a double-tap to drag, and adds a new SwitchPreference
that toggles between the old (hold to drag) and new behavior.
## 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
The contacts plugin is the only one that copies (and persists) data to the
remote device just by connecting. By adding this extra confirmation once
per device, we prevent this from happening in cases where someone paired
with a friend to transfer a file, or paired by accident.
As discussed in Matrix and BUG: 474121 this plugin is confusing (because
it doesn't actually take a photo, it just launches the camera on your
phone) and its use case can be covered by taking a photo and sharing it,
which only requires a couple extra clicks.
## Summary
Remove the dead "New Message" notification channel.
This channel was used for a tiny period, probably around 4 years ago, when we thought the only way to support sending MMS on Android was to be the default SMS app, thus we wanted to show users a notification when they received messages while our app was in charge of handling them.
Thankfully, we do not need to be the default SMS app, so this notification channel should be removed.
## Test Plan
### Before:
Looking at the list of notification streams in the settings for KDE Connect will include a "New Message" channel. Notifications are never posted to this channel.
### After:
Users will not see a "New Message" channel. Note that it does show a count of deleted streams, to prevent spam. See [documentation](https://developer.android.com/develop/ui/views/notifications/channels#DeleteChannel) for explanation.
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.
Uses Android's `NsdManager` to announce a `_kdeconnect._udp` service using MDNS. This is done in addition to sending UDP broadcasts.
When we detect a device this way, we send a UDP identity packet to it (identical to the ones we broadcast but sent to a single device).
I also added a toggle in settings to disable the UDP broadcasts, so we can test MDNS by itself.