Missing break statements causes sync issues and SMS to be parsed as MMS and leads to the URI of a SMS not being found within the MMS content and SMS sync failing.
This reverts commit 7efb1f81b5.
For some weird reason, mina-sshd works fine without desugaring NIO on
Android 5 but fails with `java.lang.NoClassDefFoundError: Failed resolution
of: Ljava/nio/channels/AsynchronousChannelGroup;` before reverting this
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
Since Android 8, this ID is stable across reinstalls of the app. This
causes other devices that already were paired with us to find a cert
mismatch and refuse to communicate with us after a reinstall or data wipe.
* Remove usage of deprecated WiFi ConnectivityManager
* Only listen for non-cellular network changes (where we can find devices)
* Do not listen for network changes also from PairingFragment
## Summary
This MR adds gyro mouse capability, which allows you to move the cursor of a connected device by simply moving the connected phone. It uses standard Android gyroscope sensors. Mainly aimed at usage with computers attached to very large screens (e.g. TV's), as using the touchpad as-is can feel somewhat unnatural.
While it does attempt pretty much the same thing as !285, this MR attempts to reduce redundancy as much as possible by simply extending the existing MousePadPlugin instead.
Tested on a Xiaomi Redmi Note 11, on a Samsung A71, and on a laptop running Arch Linux and KDE Plasma 5.27.3
## Test Plan
1. Make sure the 'Remote Input' plugin is enabled on the Android device.
2. Make sure the 'Virtual Input' plugin is enabled on the target device.
3. Open Plugin Settings -> Remote Input for the target device.
2. Enable the toggle for Gyro mouse.
3. Exit settings and go to the Remote Input activity for the target device.
4. Try moving the device around in 3D space.
5. Confirm that the mouse pointer moves predictably.
Android 13 added the ability to select languages on a per-app basis. Supporting this feature simply requires us to provide a listing of all of the locales supported by the app: https://developer.android.com/guide/topics/resources/app-languages
This change adds a locales_config.xml file to list the locales and references this file in the application manifest
Add a debug and test CI. As the test coverage today is not much to get excited about, this is mostly a check that the app still builds, as well as a convenient way to download the prebuilt app for testing.
SpongyCastle was a fork of BouncyCastle needed before Android 3.0 because
of a conflict with Android's own version of BC. It's no longer needed and
rarely receives updates anymore [1]. Furthermore the version we were using
was from 2015 and had security issues (although I'm not sure we were
affected by them since we only use it to generate certificates).
With this change we now also use Java's standard library to read the certs
from a byte[] since the standard CertificateFactory can already do that.
[1] https://github.com/rtyley/spongycastle/issues/34
This fixes the bug introduced in f97216 which prevented configuring storage
locations because the plugin wasn't returned by `getPlugin` when there are
no storage locations present.
* Do not ask for WRITE_EXTERNAL_STORAGE in Android 11+ (writing to "Downloads" is [allowed by default since 11](https://stackoverflow.com/questions/70248631/starting-from-android11-do-i-need-to-comply-to-androids-saf-just-to-even-creat)).
* Do not check for permissions before receiving a file. Try and let it error out, instead of silently doing nothing.
* Fix not offering to open content:// urls (we checked the URLs to be file:// urls to then convert them to content://).
* Better permission explanation text.
Removes conditional code for older Android versions (IceCreamSandwitch, JellyBean, KitKat, Lollipop) since we no longer support Android older than Lollipop (5.0).
This doesn't remove KitKat support in the SFTP plugin since it's a bit more convoluted. It will be done in a separate MR.
On Android 10 and above, Clipboard needs to be manually sent. Recently the app was shipped with the patches so that users can use adb to grant the required permissions for automatic clipboard propagation.
In case the permissions were granted for automatic clipboard propagation, 'Send Clipboard' option was hidden from persistent notification but was not removed from the DeviceFragment. This MR addresses this.
Certain implementations of the protocol (namely GSConnect) use UUIDS
for the device IDS/command keys, which contain hyphens in them. The
current implementation of RunCommandControlsProviderService (used for
the android 11 power menu command control things) gives the controls
unique IDS with "{deviceid}-{commandkey}" and then tries to split on the
hyphen, which obviously breaks if the device id or command key contain
hyphens. This patch changes it to uses colons to separate them instead.
Note that I've only tested this with GSconnect, but I see no reason why
it wouldn't work with the normal KDE connect implementation too, unless
it uses colons in IDs.
## Summary
Android apps which target SDK 31+ require specifying the mutability of any PENDING_INTENT. This is not supported in the upstream android-smsmms library: https://github.com/klinker41/android-smsmms/pull/193
Until the above PR is merged, we need a solution. I have pulled the code into https://invent.kde.org/sredman/android-smsmms and published the package in the Maven repository in gitlab.
BUG: 464392
## Test Plan
### Before:
Attempting to send an SMS or MMS message using kdeconnect-sms results in no message being sent, and an error being logged:
> V/Sending message: Sending new SMS
> E/Sending message: Exception
> java.lang.IllegalArgumentException: org.kde.kdeconnect_tp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
> Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
> at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
> at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
> at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
> at com.klinker.android.send_message.Transaction.sendSmsMessage(Transaction.java:267)
> at com.klinker.android.send_message.Transaction.sendNewMessage(Transaction.java:158)
> at com.klinker.android.send_message.Transaction.sendNewMessage(Transaction.java:172)
> at org.kde.kdeconnect.Plugins.SMSPlugin.SmsMmsUtils.sendMessage(SmsMmsUtils.java:188)
> at org.kde.kdeconnect.Plugins.SMSPlugin.SMSPlugin.onPacketReceived(SMSPlugin.java:414)
> at org.kde.kdeconnect.Device.onPacketReceived(Device.java:570)
> <snipped for brevity>
### After:
SMS and MMS sends normally.
## Summary
Fix a logic error in the SMS plugin which caused it to skip the addresses of other targets when reporting group messages.
Notionally, this bug originated with the logic change in !197, where everything switched to using the android-smsmms library.
BUG: 464555
## Test Plan
### Before:
Group messages would be returned as single-target messages between you and the sender, meaning the desktop app would have a bad time showing them.
### After:
Group messages are returned with the appropriate list of addresses, the desktop app groups them appropriately.
With the old logic, the mostRecentTimestamp would effectively only be updated once, the first time the app noticed an SMS/MMS. This means that, until the app was next closed, it would return every message sent or received after that timestamp. Since the app doesn't crash as often as it used to, this can grow to a quite significant number of messages.
The Play Store asks us a video showing why we need the accessibility
service, and I can't make it work so I can't record the video.
Removing this plugin removes the need for any accessibility permissions.
Motivation: We can't publish to the Play Store with a targetSdkVersion < 31
The new targetSdk required two changes:
* Specifying when activities, services and receivers should be exported or
not to other apps. For the ones I wasn't sure of what we want, I made
them exported to not break something.
* Specifying when a PendingIntent should be mutable or immutable. I made
them all mutable for now.
## Summary
Since a lot of devices now have Android 13, some users might want support for the new themed app icons.
This adds support for these, by adding a monochrome drawable (just the default icon with only the phone border and K) in `res/drawable-v24/ic_launcher_monochrome.xml` and then referencing this in `res/minimap-anydpi-v26/ic_laucher(_round).xml`.
## Test Plan
This can be tested by simply compiling and installing the app as usual on any device running Android 13.
After installing the app, the option for an adaptive colour theme will need to be enabled:
- OneUI5: Long-press home screen > Wallpaper and Style > Colour palette > enable colour palette and check "Apply palette to app icons"
- Pixel: Long-press home screen > Wallpaper & style > check "Themed icons"
The app icon should now follow the system theme (on some devices only on home screen, on others both home screen and app drawer).

## Summary
Clean up a bunch of lint errors in SMSHelper.java. Some of these are null issues which in theory might prevent a crash.
## Test Plan
No functional changes are expected. Fetching SMS still works for me.
## Summary
Spawning new threads in Java is costly. This MR aims to use a common thread pool instead.
I've replaced all cases where a new thread is started just to perform a task in the background. This does not include cases where a reference to the newly created thread is kept as a part of application logic – this is probably a problem in itself, but it exceeds the scope of this quick optimization. ;)
There was a couple of cases where a new thread was spawned just to sleep for a while an then change the state on a View on the main thread. I've replaced those with posting those deferred tasks to the View's message queue.
## Test Plan
Everything should work the same as it has before, just a bit faster and easier on the memory.
Colors don't work in some cards, menus and the hamburger menu
## Summary
I'm trying to make KDEConnect pull colours from the Material 3.0
wallpaper in Android 12. I've managed to do this to an extent by editing
the xml files in res/values*. There are, however, certain UI elements
that do not respond to the changes I've made, with no obvious files
where their colours may be changed.
## Screenshots
### The devices screen looks great (Except "KDE Connect Devices" in the
App bar isn't themed.)

### The hamburger menu has a white color in light mode. Don't know where
this is set and how to change it

### Three dot menu has a white colour

### Add new devices looks good too

### Not the popup menus though

### Cards in the About section are still white

### Dark mode works fine

### But again, some UI elements like the hamburger menu aren't themed.

I'll keep trying to figure out how to make these elements to their
proper colours, but I've done a lot of searching through the source and
couldn't figure out how. I'm absolutely new to Android development. Help
please.
## Test Plan
For the changes made thus far, none are needed.
## Summary
Since !158, fetching messages has been painfully slow. This is because, instead of making one cursor (database) call, we needed to make two per conversation.
Unless someone finds a conversations URI which works on Samsung devices and reliably returns data, there isn't much we can do about that. What we can do, is return each conversation more quickly to get the UI populated and to prevent blocking the main thread forever.
This attempts to return conversations ordered by most-recent first. If the conversations URI returns junk for the thread date, it will return in an undefined order.
## Test Plan
#itworksforme
Official gradle docs recommend using settings.gradle file (see https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#always_define_a_settings_file).
Blank Android projects in Android Studio declare their name and repositories in settings.gradle. Therefore, it makes sense to create such file here and add that information in it.
An explicit project name allows us to know exactly to what `project.name` resolves, instead of relying on the project root directory name, which can be changed by the developer locally.
## Summary
Fixed MprisActivity crash in landscape orientation caused by mismatched portrait and landscape layout resources
BUG: 435016
## Test Plan
### Before:
App crashed on MprisActivity when phone is switched to landscape orientation
### After:
App works normally in landscape mode
Allows to control the volume of the default sink of the remote device by pressing phone volume keys on API21+ (Lollipop and onwards) when MPRIS session is active (i.e. MPRIS media control notification is present). Remote device should support System Volume Plugin and report its default sink. Volume controlling works both when the phone screen is off and on. When the screen is on, you'll see a new slider in the volume panel.
BUG: 398848
## Summary
Currently, KDE Connect for Android doesn't show the last 2 characters of the verification key when pairing a device. This MR solves this issue.
This bug is caused by incomplete conversions from byte arrays to strings in `SslHelper.java`:
```java
for (int i = 0; i < hash.length - 1; i++) {
formatter.format("%02x", hash[i]);
}
```
The ```i < hash.length -1``` converts the bytes in the array up to (inclusive) the penultimate one. Removing the ```- 1``` allows for the last byte to be converted (this is the missing 2 characters).
BUG: 445955
## Test Plan
### Before:
Selecting a desktop from the available devices, then clicking the `Request Pairing` button causes a 62 character key to be displayed. It is 2 characters short of the actual key, which can be seen on the desktop KDE Connect app.
### After:
Selecting the `Request Pairing` button now shows the whole verification key, as intended.
The Settings and About fragments are arguably one logical layer below the PairingFragment (which feels like the "main screen").
Capture the back press and return to the PairingFragment.
Fixes https://bugs.kde.org/show_bug.cgi?id=442716.
Notes:
- In a DeviceFragment back-pressing continues to close the app, as before. Judging from the fact that the app persists the last selected device to the shared prefs, I assume this is a intentional.
- I also thought about storing from where the Settings/About were opened (e.g. from a specific DeviceFragment) and returning there. However this would be a much larger change with arguable user benefit. After all, from the PairingFragment it's just a single click to your device.
Set the title "Settings" to the action bar in the SettingsFragment.
Previously, depending on where you came from, it just read "KDE Connect Devices", "About" or the device name.
## Problem
On Android 10 (API 29) or later, when a trusted network has been configured, if the mobile device rejoins the network while KDE Connect is running in the background, it doesn't reconnect to any paired devices in the trusted network. It only reconnects when the user brings the app to the foreground.
## Cause
Android 10 introduced [a separate permission for background location access](https://developer.android.com/about/versions/10/privacy/changes#app-access-device-location).
When KDE Connect is running in the background with API 29+, [`TrustedNetworkHelper.currentSSID` fails to get the SSID](d22967f475/src/org/kde/kdeconnect/Helpers/TrustedNetworkHelper.java (L77)) because it doesn't have the required permission. This prevents KDE Connect from verifying whether a network is trusted.
## Solution
Make KDE Connect request for background location access permission.
To request for background location access, an app must [declare it in the manifest](https://developer.android.com/training/location/permissions#background), or else the option to to enable background location access won't appear in settings.
As a side note, the permission request dialog in `TrustedNetworksActivity` doesn't require changes because after Android 11, the option to allow background location no longer shows up in a dialog. [It has to be manually enabled in settings.](https://developer.android.com/training/location/permissions#background-dialog-target-sdk-version)
## Test Plan
### Before:
On Android 10 or later, configure a trusted network and pair with a device in it. Let KDE Connect run in the background. Disconnect from the trusted network and then rejoin. KDE Connect won't automatically reconnect to the paired device.
### After:
Do the same steps as above, except after configuring the trust network, go into settings and allow KDE Connect to access location all the time. After KDE Connect rejoins the trusted network, it should automatically reconnect to the paired device.


Adds the Android 8+ style adaptive icons, using the app's highlight color for extra contrast against the current fallback white background behind the white phone border. This new icon follows the size and grid guidelines of material design, and was created as a 108dp@1x svg
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
This plugin lets you monitor the signal strength of the mobile connection of the phone,
so you may know if opening a hotspot is viable, or figuring out why a connection dropped while hotspot-ing.
## Summary
Add support for handling message request packets which have a list of attachments
## Test Plan
- Sent message with no attached file from desktop which was sent and received correctly
- Sent message with attached file from desktop which was sent and received correctly
- Sent message with two attached files which was sent and received correctly
Adds new functionality to the MousepadPlugin to accept data via Intent and pass them on to the host as keystrokes via the existing MousePadPlugin.PACKET_TYPE_MOUSEPAD_REQUEST PackageType
eg. to easily send OTP codes from the phone to the Desktop
Changes:
1. In the menu, the design of the selected item was changed, the icon of the current device was added and the image was removed
2. Changed the accent color to orange
3. Separators have been removed from almost all lists
4. The design of the selected item was changed in the menu, the icon of the current device was added and the image was removed
4. Changed the color of the toolbar to white or black (depending on the theme)
Since commit f3ada9738d, the app crashes with a ClassCastException when going into the "expose filesystem" menu.
This is because view binding checks if the root view is the one it expects but the one passed here isn't directly the checkbox layout but instead the whole StoragePreference layout.
Because there is one view to bind, view binding here doesn't make much sense so replace it with a findViewbyId().
Also add viewBindingIgnore="true" to the view so its binding class is
not generated.
The key is a sha256 of both devices' certificates. Both should generate the
same key, so hey user can check they are pairing against the right device.
Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
Revert a7a66ecb2b which accidentally confused two very similar method names
Rename those methods to make sure it's clearer for anyone else who reads this code in the future
This fixes an issue with the first sync of threads not returning the actual most-recent message if the most-recent message was an MMS with no plain-text body
When we trigger a refresh and immediately navigate away from the list the view is destroyed and the refreshing end callback is accessing the now null devicesListBinding
## Summary
Use `content://mms-sms/conversations?simple=true` instead of just `content://mms-sms/conversations` which should work for more devices (and is reported to work on Samsung devices)
For some reason, this misses exactly one conversation on my phone and throws back one invalid thread ID -- I suspect this indicates that my message database is corrupt 🤷
BUG: 401677
## Test Plan
### Before:
Lots of devices were not able to retrieve conversations. See [bug 401677](https://bugs.kde.org/show_bug.cgi?id=401677)
### After:
Hopefully all devices are able to retrieve conversations. At minimum, hopefully there are no regressions :)
- Due to Android 10 restrictions, background tasks can no longer launch activities
- Post a notification instead when a URL is received and KDE Connect is not in foreground
This reverts 3 commits:
"Clipboard Plugin: Added support to send clipboard to multiple devices on Android 10 and later."
b92271105a
"Excluded ClipboardFloatingActivity from App recents Screen"
ee1562050c
"Make Clipboard plugin work in Android X"
b81d3a82e5
## Summary
Fixes#5
BUG: 417419](https://bugs.kde.org/show_bug.cgi?id=417419)
This patch introduces a workaround to access the restricted clipboard in Android X.
Clipboard synchronisation in KDE Connect was one of the killer features before Android X. An action button is added in the persistent foreground notification **Send Clipboard** which adds the ability to send the clipboard using a small workaround. Clipboard Synchronisation works as usual in lower Android Versions.
This is a very convenient workaround for sending clipboard quickly as it does not requires to open the app. Floating Activity is quite handy for quick actions.
## Details of the workaround
### ClipboardFloatingActivity
* This activity is only executed in Android X.
* This is transparent, accesses the clipboard when in focus.
* Sends a `NetworkPacket` containing *text* and *timestamp*.
* When the packet has been sent, it pops up a toast with a success message.
* Automatically closes after the showing the Toast.
### Reverted changes for Android X.
* Changes done in commits 54be4a1a99 and 9f3b75b748 have been reverted.
* These changes are not required anymore as the workaround for clipboard sync works.
The action button in the notification for **Send Clipboard** is not added in the lower versions of Android. **It is only added in Android X**.
**Two way sync is working in Android X with this patch. Sync works normally in lower Android versions.**
## Test Plan
### Before:
Clipboard from PC to Phones were synchronised but Clipboard of phones didn't get synchronised with the PC.
### After:
The action button is up in Android X while using other apps.

After clicking the button, a cute Toast appears with the message *Clipboard sent*

I think this is one of the best workarounds available to make this awesome plugin work.
## Summary
This patch adds an interface to return only a specified window of messages.
The current implementation of the conversation interface loads all messages every time the conversation is requested. This is might be painfully slow to load in case the conversation is large or if there are a lot of MMS/RCS messages in the conversation (since those are wildly slower to load than SMS)
Used by https://invent.kde.org/kde/kdeconnect-kde/merge_requests/203 to enable Desktop functionality
## Test Plan
- With new Android app and old Desktop app:
- The Android app will notice the missing fields and query for all messages as before.
- With old Android app and new Desktop app:
- The desktop will send fields for the new interface which will not be read and all messages will be returned.
- With new Android app and new Desktop app:
- The new interface is used and returns only a certain number of messages at a time.
## Known Issues
There is an un-covered corner case if lots of MMS messages are received in the same second (or SMS messages in the same millisecond): Since the interfaces uses timestamps as a filter, it might happen that not all messages sharing the same timestamp are returned. The fact that there are still more messages sharing the timestamp is invisible to the caller. This could be a real-world problem if, for example, a user gets off a plane and their phone downloads a bunch of MMS all at once.
Seek position is preserved for following domains:
youtube.com
youtu.be
pornhub.com
vimeo.com
dailymotion.com
twitch.tv
ic_arrow_black.xml was converted from Kubuntu 19.10 AMD64
breeze-icon-theme package:
/usr/share/icons/breeze-dark/actions/32/arrow.svg
Some (Xiaomi) devices running >= Android Lollipop (SDK 22+) don't
support `Telephony.Sms.SUBSCRIPTION_ID`.
This commit adds a verification step to ensure that only devices with
`"sub_id"` column include it in query.
* Address review comments
Check was moved to a separate helper function (boolean), it's
performed only on SDK 22+ and `Telephony.Sms.SUBSCRIPTION_ID`
is used in query (instead of null), so no NullPointerException
is thrown.
Also parseInt shouldn't now fail if `Message.SUBSCRIPTION_ID` key
exists in messageInfo, but value is null
* Return false if cursor is null
* Return true without checking column
If we got the cursor, the query won't fail when executed again, and the "sim_id" column must exist (because an exception wasn't thrown).
Summary: I have created a new activity that allows you to trust all networks or add networks one by one to a list when you are connected to that network
Test Plan:
Test Cases:
1. By default everything should works like it works before, If you uncheck the "Allow all" option in trusted network menu and there isn't any ssid in the trusted
network list the app doesn't send the first udp package and log "Current WiFi isn't a Trusted Network"
2. With the "Allow all" uncheck, use "Add: YOUR_SSID_NAME" button to add your current ssid to the trusted networks list, once you added, go back and the app should
works as always
{F6152314}
1 -> https://youtu.be/ZpCEFTstbJI
2 -> https://youtu.be/cVB1LXlFVyk
Reviewers: #kde_connect, jdvr
Subscribers: sredman, albertvaka, nicolasfella, apol, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T8539
Differential Revision: https://phabricator.kde.org/D13505
This method does not work because the API doesn't provide the information we need.
If we decide to ressurect it, we can look this commit up later.
#TIMECAPSULE
In version 1.1.0 of androidx, preferences do nothing on click if they are
not selectable. Added a new property "inSelectionMode" that we can use
instead of the built-in "selectable".
This way, when installing a development version built on a different
environment, it will be signed with the same key and Android won't make
you wipe your data.
Summary: Timestamp on changes to clipboards so that when a new device connects it can sync both clipboards to the most recent updated clipboard.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, sredman, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D22585
This was causing problems when a restored app remembered the list of
storage locations it had access to, but it no longer could access them.
In the past, this also caused problems when a restored app would carry
with it a certificate that was no longer valid on the new device because
the device id had changed.
BUG: 406707
Summary:
The methods in Device.java can be used from any thread, while
the methods in BaseLink (and its subclasses) should only run
on a background thread. These annotations are picked up by Lint
to show warnings and have no effect at runtime.
This also allows "unsending" packets (if they're still in the queue).
This patch does that for mouse move packets, so they get accumulated
together (sending less stuff over a congested link).
## Summary
Export the complete list of remote addresses of a multitarget message
Note that this changes format of the returned Message object, replacing the string "address" field with a string list "addresses" field, so it is not backwards-compatible with old desktop applications
## Test Plan
See Test Plan of the desktop-side patch: https://invent.kde.org/kde/kdeconnect-kde/merge_requests/101
- Update README with new links
- Add a section pointing potential translators to the localization team
- Add a quick text file to the strings folder to again point potential translators to the localization team
Summary:
Fixes an error of extracting SpannableString as String (which resulted in notification text being null).
Fixes group conversation text extraction on API <28.
Also includes some minor refactoring.
Reviewers: nicolasfella
Reviewed By: nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D22140
The lock should be kept between the point we read and the point we write
Also, no need to pass SMSPlugin as a parameter, since enclossed classes
already have access to its parent by default.
We had a list of names before, but it was outdated. Using a library gives
us an up-to-date list plus a fallback that fetches the name from the
internet if not in the list.
According to some information I stumbled across while working on a different issue, Samsung devices do not support the content provider I was using to populate the list of SMS conversations. This is very annoying, but nevertheless there appears to be a workaround.
BUG: 401677
Many users with Samsung devices have reported problems using the SMS plugin.
Hopefully this will fix the SMS plugin on Samsung devices.
## Summary
Not having support for MMS caused some minor problems, like in https://bugs.kde.org/show_bug.cgi?id=398889 . This patch adds basic MMS support for plain-text MMS, including multi-target messages.
Android companion to https://invent.kde.org/kde/kdeconnect-kde/merge_requests/97
Currently there are several rough areas:
- Multi-target messages do not have the full list of recipients (I am planning to work on this in another patch, because this one is already quite large enough)
- Parsing MMS is significantly slower than parsing SMS. This makes sense, since we need to make significantly many more content:// calls for MMS. The only solution I can think of here is to add the ability to request a range of messages, which I need to do anyway, but which should not be part of this patch.
- The desktop app is totally busted with regard to multi-target MMS, but that will also be fixed in another MR
BUG: 398889
## Test Plan
### Before:
Open SMS app on desktop, scroll through conversations, notice:
- Any single-target message which had the most-recent message as an MMS does not appear
- Any multi-target MMS conversations do not appear
### After:
Open SMS app on desktop, notice:
- Conversations which have an MMS as their most-recent message appear
- MMS which consisted of only text are rendered correctly
- Multi-target conversations are shown (though pretty busted, as said before. Do not attempt to reply to one!)
This would happen to people who transferred their KDE Connect config from
one phone to another (mostly with backup apps that only work on rooted
phones). This led to a state where other devices would always reject the
connection because the certificate CN didn't match the device ID.
On the PC side this is not a problem because the certificate is the source
of truth for the device ID.
Summary:
So from android 8 onwards it appears that fetching content from "cleartext" urls is disabled by default
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
I have a mpris service running on my local computer which is connected to the android, that service is also serving cover art for currently playing song. Obviously I can not have a domain set for my computer on a local machine, so cover art urls look like
`http://<ip>:<port>/<songid>.ext` . Since this restriction was introduced into android 8, kde connect is not able to fetch the art from this url.
This is patch allows connections to raw IPs addresses as well. If there is any security issues regarding this change, I'm prepared to do more work, my suggestion would be to check if IP address in this case matches paired computer's IP address, although this would still be a bit annoying (especially since whatever malicious file can be served from a "cleartext" link as well).
Test Plan:
- start some sort of server which can serve an image on a paired computer
- create mpris Player instance on a paired computer and set the `mpris:artUrl` to the served address where this image is available
- open kde connect android app, select prepared player and see default cover art instead of the served image
- change artUrl to some image from the web
- check in kde connect again and see it correctly show a remote image
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, nicolasfella, andyholmes, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D21247
Summary:
Store PendingIntents from notification actions. Send list of notifications to desktop and trigger Intent when matching packet arrives.
CCBUG: 366475
Test Plan: Create test notification, trigger package is received correctly. Whether intent.send() is actually successful is NOT yet tested.
Reviewers: #kde_connect, sredman
Reviewed By: #kde_connect, sredman
Subscribers: sredman, apol, MatMaul, kdeconnect, mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12294
Returning NULL from readSymbolicLink() results in an exception that
closes the SFTP connection for some SSH implementations, notably the one
used by Gvfs (GSConnect).
primitive-ftpd had a similar issue, which was fixed by returning and
empty string instead of NULL.
Summary:
Allow in progress file transfers to be canceled
BUG: 349956
{F6373048}
{F6373050}
{F6373051}
Test Plan:
Send a large file from desktop to android
Press cancel in the progress notification
Result: the file transfer is cancelled and the cancelled file is deleted from storage
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16491
Summary:
Use Storage Access Framework on Android running SDK >= 21 so writing to
sdcard will work again
|{F6546802}|{F6546803}|{F6546804}|
|API 21+|API 19-|Edit|
Test Plan:
Install patch on Android phone with Build.Version < 19 (Kitkat)
- Without a sdcard: Verify that dolphin displays an "All Files" entry that is empty
- With a sdcard and with "Add camera folder shortcut" turned off: Verify that dolphin displays the configured display name of the sdcard
- With a sdcard and with "Add camera folder shortcut" turned on: Verify that dolphin displays the configured display name of the sdcard and also lists a "Camera pictures" shortcut
- With a sdcard: Verify that when changing the display name or the "Add camera folder shortcut" preference dolphin displays the updated items (after pressing F5)
- With a sdcard: Verify that files can be read and written to/from the sdcard
Install patch on Android phone with Build.Version < 19 (Kitkat)
- Repeat the above tests except for the read/write test: Verify that files can be read from the sdcard
Install patch on Android phone with Build.Version > 21 (Lollipop)
- Without any configured storage locations: Verify dolphin displays an "All Files" entry that is empty
- With configured storage locations: Verify dolphin displays the display names of the configured storage locations and that entering a location displays the correct directory entries
- Make one or several changes to the configured storage locations: Verify dolphin displays the display names of the configured storage locations (after pressing F5) and that entering a location displays the correct directory entries
Reviewers: #kde_connect, albertvaka, sredman
Reviewed By: #kde_connect, albertvaka, sredman
Subscribers: albertvaka, sredman, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18212
Summary: During the SharePlugin refactoring the way the mime type was determined changed which broke opening files from the desktop.
Test Plan: I can open pkpass/jsonld files in Itinerary again
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: eduisters, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17976
Summary: When a request arrive open the camera and send the taken pic back.
Reviewers: #kde_connect, broulik, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, ngraham, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18142
We were using the device context, which is not suitable to start an
Activity, causing "android.util.AndroidRuntimeException: Calling
startActivity() from outside of an Activity."
Summary:
Sequentially receiving multiple files was overly complicated sometimes leading to a progress
notification being shown indefinitely. When files are shared using an older kdeconnect-kde version
fallback to receiving each file individually
Test Plan:
Send multiple files from desktop to android and observe that android receives the files
sequentially using only 1 notification
Send multiple files from an kdeconnect-kde installation and observe that android receives the
files in parallel using multiple notifications
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17627
Summary:
Use the default configuration from Android
BUG: 400883
Test Plan: Pairing still works
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, thomasp, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18219
Summary:
Use androidx version of AlertDialog to get properly styled AlertDialog buttons
Use PreferenceManager context to style Device Name AlertDialog
|{F6551907}|{F6551908}|
|Before|After|
Test Plan: Apply patch and verify that AlertDialogs have properly styled buttons
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18298
Summary:
`Show persistent notification` toggle is disabled from Android O and up
This patch aims to enable the toggle with link to Notifications Settings, so that user can itself disable the persistent notification if desired
Test Plan: Apply patch, use on Android O or up device and use `Show persistent notification` toggle. It should take you to Notifications settings page of KDE Connect
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, eduisters, nicolasfella, kdeconnect, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18181
Summary:
Androidx introduced new Materialcomponents themes, use them instead of
Theme.AppCompat. This also causes AlertDialogs and PreferenceDialogFragments
to be styled correctly
|{F6531506}|{F6531505}|
|Before|After|
(Ok button is disabled if you are wondering)
Test Plan: Apply patch, verify everything still looks as expected
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18039
Summary:
The Simplify pairing from notification patch D16518 broke the functionality that
tapping on the notification provided
This patch makes tapping on the pairing notification work again as expected
Test Plan:
Before applying this patch initiate a pairing from kde
On android tap on the notification (not the action buttons) and notice that nothing happens
Apply the path and repeat the above test. Now the DeviceFragment should be displayed allowing
the the pairing to be accepted or rejected
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17886
Summary:
When a new track starts playing and does not have album art the previously displayed
album art image will be displayed until a new track starts playing that does have
album art
Test Plan:
Before applying this patch play a track that has album art followed by a song
that does not have album art. Notice that when the track without album art starts
playing the album art of the previous track is still displayed
Apply patch, repeat previous test and notice that the album art placeholder is displayed
when the track without album art start playing
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17875
Summary:
PreferenceActivity has been deprecated since Android 3.0 API 11 in favour of PreferenceFragment
| {F6515113} | {F6515114}|
|Before|
| {F6515111} | {F6515112}|
|After|
Test Plan:
Apply patch and observe that the DeviceSettings and PluginSettings screen behave as expected
and now also follow material design guidelines
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17859
Summary: Use the new AndroidX libraries instead of the legacy support libraries
Test Plan: Apply patch and verify everything works as before
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: shubham, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17818
Summary:
Use bigtext style.
BUG: 402489
Test Plan: Send notification with long text. Before a single line was shown. Now the user can view the full content by pulling down the notification
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17786
Summary:
They were silent anyway and are not really useful
BUG: 402490
Test Plan: I don't see the MPRIS notification in the plasmoid any more
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17776
Summary: Don't show silent notifications. With D17776 we don't send silent any more, but we might again in the future.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17777
Summary:
On my Samsung Galaxy S5 mini (Android 6.0.1) browsing the sdcard is not possible because there
is a hidden file .android_secure that is not readable by a normal user.
For such a file File.exists() returns false while File.listFiles() does return it
and SftpSubsystem.writeAttrs() throws an exception
Test Plan:
On a device where the SDCard cannot be browsed (I think its API 23 and up)
install kdeconnect with this patch and verify that the SDCard can now be browsed successfully
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17644
Summary:
Currently a2po exports files with a c-format tag, which means that plural forms "Failed receiving file from %2$s" are invalid for instance (it should be %1 to %n). Translations are subsequently blocked by the subversion pre-commit hooks.
This fix reorders the placeholders.
Reviewers: #kde_connect, eduisters
Reviewed By: #kde_connect, eduisters
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17688
Summary: When upgrading the app to the version with the new privacy options (D17126), the app will crash with some error about missing a table in the Notifications Plugin database. This patch adds the table in onUpgrade in a proper way.
Test Plan:
- Build current app from master
- Disable some apps in the Notifications plugin
- Apply this patch (as well as its dependency, D17126)
- The app should work, with your old settings, and now able to toggle privacy options!
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Differential Revision: https://phabricator.kde.org/D17521
Summary: Add Privacy Options for Notifications Forwarded to Desktop.
Test Plan:
* Open the android app.
* Go to Notifications Plugin Filter List (?)
* Long click any application.
* Press "Privacy options".
* Set your options.
* Close the menu and get a notification.
Reviewers: sredman, #kde_connect
Reviewed By: sredman, #kde_connect
Subscribers: sredman, alexkovrigin, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T9850
Differential Revision: https://phabricator.kde.org/D17126
Summary: Change ThreadID to long
Test Plan:
Messages should send and receive as before. Additionally, if your device has assigned extremely large ThreadIDs, the SMS plugin should no longer crash.
This patch corresponds to the KDE-side revision D17516
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17517
Summary:
Make DeviceFragments listview use full screen width so the over scroll indicator looks better
| {F6466146} | {F6466147} |
| before | after |
Test Plan: Apply patch and notice that the layout of the list elements has remained the same as before
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17456
Summary:
Add CoordinatorLayout and AppBarLayout to activity_main.xml to support
more material design features (eg. FAB moves out of the way when a Snackbar is displayed)
Test Plan: Apply patch and confirm that the app looks the same as allways
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17451
Summary:
When starting kdeconnect the following message appears in logcat:
I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
Test Plan: Apply patch, launch app and verify that this message is no longer logged to logcat
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17434
Summary: The desktop side goes as far up as 1764.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17271
Summary:
When you close a SSLSockets input or output stream the socket does not get closed leading to may
sockets in the CLOSE_WAIT state. This will eventually deplete the available file descriptors
Test Plan:
Before appying this patch share a file from desktop to android
After the share is finished issue the command:
netstat -pW | grep kde
There should be a line showing that the socket used is in the state CLOSE_WAIT like below
tcp6 0 0 ::ffff:192.168.0.32:33604 ::ffff:192.168.0.2:1739 CLOSE_WAIT 6200/org.kde.kdeconnect_tp
Apply this patch and repeat the test. Now there should no longer be any sockets in the CLOSE_WAIT state
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17320
Summary:
When an orientation change occurs the fragment manager will automatically
re-create the content fragment for us.
Test Plan:
Set the content fragment to DeviceFragment and change orientation
Result: DeviceFragment is shown for the correct device and the correct navigation view menu item is checked
Set the content fragment to PairingFragment and change orientation
Result: PairingFragment is shown for the correct device and the "Pair new device" navigation view menu item is checked
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17409
Summary:
When receiving a text share an attempt is made to show a toast but that results
in an exception because the issuing thread is not running a looper.
Test Plan:
Without this patch applied Share a text with an android device using the plasmoid
Result: No toast is displayed and in logcat you will get a:
java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare() exception
With this patch applied again Share a text an android device using the plasmoid
Result: The toast is actually displayed even when the activity is not in the foreground
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17400
Summary: It is common practice to use a static newInstance to create new fragment instances instead of using non-default constructors
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17390
Summary: queuedSendUriList can return null and subsequently an attempt is make to actually send this null packet
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17384
Summary:
When an empty file is send from the desktop SharePlugin onPacketReceived
does not see a payload so the packet is discarded
Test Plan:
Send an empty file from the desktop
Verify that a notification is shown notifying the user that a file was received and that file has been created in the filesystem
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17235
Summary:
currentShareInfo needs to be nulled when a transfer is complete if not the next transfer will
have incorrect notification information and will never finish
Test Plan:
Send 2 files from desktop to android, notification is as expected (eg (File 1 of 2) followed by (File 2 of 2)
When transfer is complete send 2 files again, notification is as expected and is finished when transfer is done
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17259
Summary:
On desktop NetworkPacket.hasPayload() tests m_payloadSize
On android NetworkPacket.hasPayload() tests mPayload
This patch makes android also test mPayloadSize to make things more consistent
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17236
Summary:
When multiple files are shared from desktop to android the transfer of the
files should be handled using 1 notification
Depends on: D17081
Test Plan:
Share multiple biggish files from desktop to android
The sharing progress is displayed using 1 notification
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17157
Summary:
When an empty file is shared with the desktop a server is started that times-out after 10sec
this causes a notification to be displayed telling the user the transfer failed
Test Plan:
Send an empty file to the desktop
A notification should be displayed telling the user the transfer succeeded
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17176
Summary: When a Share packet with a file and "open: true" arrives ope that file directly. Files are always downloaded to the standard location to avoid the FileProvider trouble
Test Plan: TBA
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T8637
Differential Revision: https://phabricator.kde.org/D15293
Summary:
When receiving large files (even worse when uploading multiple files) the receiving socket
often times-out.
Test Plan:
Send 1 or 2 big files from desktop to android without this patch and you should see 1 or both transfers
fail because of a SO_TIMEOUT
Apply this patch and re-run the test and both transfers should now complete without an SO_TIMEOUT
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: zhigalin, albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16758
Summary:
In src/org/kde/kdeconnect/Helpers/SMSHelper.java:
getMessagesWithFilter() and getConversations() functions are now both using new function: getMessages().
Test Plan:
* Build android app and run it on android phone
* Pair it with the desktop and open sms app (kdeconnect-sms).
* Everything works as earlier, but now with refactored code.
Reviewers: sredman
Reviewed By: sredman
Subscribers: sredman, alexkovrigin, kdeconnect
Tags: #kde_connect
Maniphest Tasks: T9841
Differential Revision: https://phabricator.kde.org/D17002
Summary:
Update packet type with proper field names and commenting
Send new "event" field
Test Plan:
- Install corresponding Desktop-side patch D16599
- Verify that it is still possible to synchronize messages the same as it was before
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16600
Summary:
On android versions >= 24 manifest registered broadcast receivers for ConnectivityManager.CONNECTIVITY_ACTION
will not receive the broadcast, see: https://developer.android.com/reference/android/net/ConnectivityManager#CONNECTIVITY_ACTION
Test Plan:
Run app on phone with API > 24 without this patch and this broadcast will not be received any longer
Run app on phone with API > 24 with this patch and this broadcast will be received again
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16738
Summary:
When loading large images you can run into an OOM situation crashing
the app and leaving the progress notification displayed indefinitely
BUG: 397507
Test Plan:
Before applying the patch find a phone where the app crashes when you send a very large
image to it (my 6.0.1 phone did not even crash when i send it a 85MB image but my 4.0.4 phone
already crashes on a 7MB image)
Apply patch install and send image again
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16712
Summary:
Manifest.permission.READ_EXTERNAL_STORAGE was added in API 16 so older API's do not
have to request this permission
Test Plan:
Install on API < 16 device or emulator
Pair and browse device using dolphin
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16613
Summary:
Fixes the situation where when 2 or more files are send to Android clicking the share button
in either of the notifications will always share the last received file.
BUG: 396051
Test Plan:
Send 2 files to android
Click on the share button of the first received file
The first file is actually used for the share and not the last received file
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16707
Summary: BUG: 399983
Test Plan:
Send a big file from Android
The notification can not be dismissed while the file is being transferred
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16713
- Now we store the "select all" as the default value for apps not in the DB
- This also means new apps, which makes sense
- We pre-fill the "select all" checkbox with the default value
Also, now we store true/false as integers 1/0 instead of as string
Summary: When a pairing is accepted or rejected through notification actions a new DeviceFragment was created but this fragment was never actually attached to the fragment manager so not displayed to the user.
Test Plan:
Request a pairing from the desktop and Accept or Reject the pairing on Android using the notification Action buttons
When you accept the pairing the DeviceFragment should be shown for the device, the action bar title should be set to the devices name and the device should be selected in the NavigationView
When you reject the pairing the PairingFragment should be shown
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16518
Key android.title expected String but value was a android.text.SpannableString. The default value <null> was returned.
Attempt to cast generated internal exception:
java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
Summary:
There is a common pattern:
BackgroundService.RunCommand
getDevice
check device != null
getPlugin
check plugin != null
doCode
Add a helper for this pattern and port existing code
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16472
Summary: It always returned false previously
Test Plan: I'm seeing the mobile data warning for the first time
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16445
Summary: Gradle is automatically configured by Android Studio. However, the project is troublesome to build when using other tools. Per https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:adding_wrapper, the files added by this patch ought to be included in the repository
Test Plan: After applying this diff, it should be possible to clone a fresh repository and run ./gradlew build, resulting in an .apk in ./build/outputs/apk/*/
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16439
Summary: UDP Identity packet should set tcpPort to the actual tcpServer port used
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella, sredman, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D16351
Summary: Use some lambdas to simplify the code
Test Plan: Denie some permissions, open permission explanation dialogs
Reviewers: #kde_connect
Subscribers: kdeconnect, mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12232
Summary:
BUG: 393190
Add checkbox to (de)select all
{F5812151}
Old proposal:
{F5810640}
Test Plan:
Deselect all, verify that no notification is coming from test app.
Select all, ...
Deselect all, select single app, ...
Reviewers: #kde_connect, broulik
Reviewed By: #kde_connect
Subscribers: albertvaka, kdeconnect, apol, mtijink, broulik, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12281
Summary:
Bug: 396954
Sometimes multiple broadcasts with the same state arrive. Only handle them when the state actually changes
Test Plan: Get called, "Calling" notification appears. Caller hangs up, "Call missed" notification appears.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15838
Summary:
Mark old-style SMS packet sending as deprecated (but still supported for backwards-compatibility with old Desktop apps)
Implement a ContentObserver on the Messages database, then send an update to the remote for all incoming or outgoing messages
Test Plan:
1. DBus
- Connect Android to desktop
- Subscribe to /modules/kdeconnect/devices/<device_id>/org.kdeconnect.device.conversations/conversationUpdated
- Receive a new message (text yourself?)
- Verify that something comes back on dbus (This endpoint is updated by D15409. With that patch you should see the new Message object, before you should just get the (meaningless) conversation ID)
2. SMS App
- Relies on D15409 - See instructions there
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15360
Summary:
- Rename all SMS-handling packets to indicate that they belong to the SMS plugin
- Define TELEPHONY_REQUEST_MUTE packet to replace TELEPHONY_REQUEST packet
Please see KDE-side patch here: D15543
Test Plan: See test plan in D15543
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15544
Test Plan:
Get called: Notification appears as before.
Get SMS: Notification shows and it appears in SMS app after reconnect.
Write SMS from app: It shows up on the phone
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D14612
Summary:
This patch adds cursor acceleration to KDEConnect's remote input plugin. The cursor movement is now scaled down if the movement is slow, and scaled up if the movement is fast.
The acceleration is implemented on the android side. An additional setting was added to the android app's Remote Control plugin preferences, allowing the user to choose the strength of the acceleration, or to disable the acceleration completely.
Test Plan:
After installing this revision on your android device, go to the remote input page and start using the mousepad. Cursor acceleration should be enabled by default.
Check if the cursor acceleration is intuitive and easy to use. Also, try tweaking the acceleration in the Remote input settings in the Plugin settings menu.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D14720
Summary:
This adds a plugin with buttons for next and previous slide and fullscreen.
It also allows you to use volume up/down to change slide, even when the screen is off.
It can be extended to show do more presentation-related stuff eventually.
On the desktop side, it uses the already present 'mousepad' (keyboard input) plugin.
Test Plan: Tested manually.
Reviewers: #kde_connect, nicolasfella, apol
Reviewed By: #kde_connect, nicolasfella, apol
Subscribers: apol, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D14430
Summary: A simple widget to execute commands from android desktop
Test Plan:
Add the widget and execute commands from it.
By default, the selected device is the first device in the device list.
The selected device can be changed via the widget title.
If there is no commands, the widget show an empty list
If there is no connected device, show the message located in @string/unreachable_description
Reviewers: albertvaka, nicolasfella, #kde_connect
Reviewed By: albertvaka
Subscribers: kdeconnect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12507
Summary:
The "Send files" button in main acitivity if connected has a larger
indent then the other buttons. This happens on most pixel densities.
Reason was the larger icon the "Send files" button has.
With this patch, the icons all have the same pixel dimensions. It
solves the too large indent.
Screenshot (Because of translation, "Send files" is translated to
"Dateien senden"):
{F6136062}
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, apol, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D14344
Summary:
Depends on D12289
IMHO it looks sleeker without, especially the dividers on top and bottom and before the section headers are disturbing. Since the content of each list item is just one line of text its also not really needed to separate things
Test Plan:
Before:
{F5810802}
After:
{F5810803}
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect, apol, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12290
Summary:
Add a slider for every sink to the MPRIS Activity. The sink can be muted by clicking on the volume icon.
.
See D7992
BUG: 377319
Reviewers: #kde_connect, mtijink, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, MatMaul, kdeconnect, Murz, mtijink, #kde_connect
Tags: #kde_connect
Maniphest Tasks: T4659
Differential Revision: https://phabricator.kde.org/D7993
Summary:
Make it possible to trigger commands by opening an URI like kdeconnect://runcommand/<deviceid>/<commandid>
Makes it possible to trigger commands from NFC tags.
To ease the setup the url can be added to the clipboard
Test Plan:
Long-press a command entry
Select Copy URL to clipboard
Write into NFC tag or use kdeconnect-handler to trigger url
See command executing
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, apol, kdeconnect, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D13447
Summary:
KDEConnect's Remote Input feature does not take display DPI into account, resulting in inconsistent mouse sensitivities for devices with different DPIs.
This revision aims to fix that by dividing the mouse delta with the relative DPI of the current device. By doing so, the same amount of finger movement should produce the same amount of cursor movement, regardless of the device's DPI.
Addresses the following bug:
BUG: 391029
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: sredman, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D13925
Summary: Add support for requesting all conversations and sending the reply
Test Plan:
- Build this diff
- Build the corresponding KDE-side diff (D11854)
- Put a breakpoint in handleRequestConversations somewhere where you can inspect one or more Message objects
- Use DBus to poke /modules/kdeconnect/devices/<deviceID>/telephony.requestAllConversations()
- Verify that the constructed Message is one you sent or received and that it is the most recent in the corresponding conversation
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: MatMaul, kdeconnect, nicolasfella, mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11698
Summary:
Add a plugin to the KDE Connect Android application which supports reading the Android contacts databases and sending the requested data as vcards
- Android automatically has support for exporting vcards with all the fields you would expect (phone, email, photo, etc.)
- I add two custom fields, one for the modification timestamp and another for the NAME_RAW_CONTACT_ID so that the contacts can be correlated back to the Android database
This does not (yet) support writing contacts back to the phone nor does it automatically listen to the phone's contacts database to change
BUG: 367999
Test Plan:
Connect the device to the desktop and verify that vcards are created in QStandardPaths::GenericDataLocation / kpeoplevcard". On my system this is ~/.local/share/kpeoplevcard
Create a dummy contact on the device and verify it is synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)
Modify the dummy contact and verify the modifications are synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)
Delete the dummy contact and verify the deletion is synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)
Reviewers: #kde_connect, mtijink, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: MatMaul, philipc, kdeconnect, nicolasfella, andyholmes, mtijink
Tags: #kde_connect
Maniphest Tasks: T8283
Differential Revision: https://phabricator.kde.org/D9690
Without this, when receiving a new notification on phones with ambient
display the notification shown there is the persistent notification
instead of the new notification received.
Summary:
- Add a foreground notification to the background service
- Add channel to notifications.
- Remove unneeded permission
- Remove legacy ciphers now that we don't support API<16
Reviewers: #kde_connect
Subscribers: mtijink, nicolasfella, albertvaka, apol, kdeconnect, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12881
Summary:
Oreo requires that each notification has a channel assigned. This patch uses a common channel for all. Individual channels for different notifications (Notifications plugin, pairing notifications, share plugin) could be done, but
since in our case notifications are not a critical part of the UX it does not seem necessary to me. Setting the channel on NotificationCompat.Builder requires version 26 of the support library, the implications of this were
discussed in D8966.
Reviewers: #kde_connect
Subscribers: mtijink, albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9514
Summary:
This way, the user always knows that KDE Connect is running (and what devices are connected). This is a requirement in Android Oreo.
Implements task T6218.
Reviewers: #kde_connect, nicolasfella
Subscribers: apol, albertvaka, nicolasfella
Differential Revision: https://phabricator.kde.org/D8966
Summary: D12212 broke the devices list in the SharePlugin. No devices was shown even when there were devices available.
Test Plan: Open up share devices list with 0/1 devices available
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kdeconnect, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12334
Summary:
Exposes media sessions to the desktop for use with the MprisRemote plugin and the app.
Still contains some Logs, will remove them when its time.
Test Plan:
What works:
- Displaying and updating title, artist and album.
- PlayPause, next and previous
- Playing state
- multiple sessions
What doesn't work:
- volume control
- length and position
- Album art
- can* abilities are not exposed, e.g. canGoNext, not sure if possible at all
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: kdeconnect, mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12559
Summary: Let Android Studio replace anonymous types with lambdas. No manual code change.
Test Plan: Compile and superficial behaviour test
Reviewers: #kde_connect, philipc
Reviewed By: #kde_connect, philipc
Subscribers: philipc, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12229
Summary:
Add a couple of assertions and checks to the album art fetch code. Hopefully fixes bug https://bugs.kde.org/show_bug.cgi?id=393274, or otherwise at least gives a bit more information.
BUG 393274
Test Plan: Fixes the bug, according to the reporter.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12618
Summary:
BUG: 375376
This revision adds dark mode support to the app ( T7044 ). It does so by injecting
theme information into each activity, and making sure that all Views
define their colors by reference to theme attributes.
In order to make this work, all of the buttons with images (like the list
of available devices) now are tinted according to the theme.
While all versions of android support the theme, only devices running
Android ICS or higher will have a toggle button in the drawer.
Test Plan: Open all the screens, both with and without the dark theme on.
Reviewers: #kde_connect, mtijink, #vdg, nicolasfella
Reviewed By: #kde_connect, mtijink, nicolasfella
Subscribers: apol, ngraham, nicolasfella, mtijink
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11694
Summary: Allow a mapping of fields to be a field of a NetworkPacket
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11870
Summary:
Previously, if the user hadn't set a ringtone, the code raised an exception (because an empty string isn't an uri). Thus, no sound was played.
This fixes it.
BUG: 392853
Test Plan: Without having set a ringtone, it works. Otherwise, it works too.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: nicolasfella, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12070
Summary: You can share the just-received file. It doesn't work with a custom download directory (just like opening such files doesn't work yet). It also won't close the notification once shared.
Test Plan: Sharing to other apps works.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11680
Summary: Won't typically be a problem (you're usually connected via wifi with KDE Connect anyway), but shouldn't hurt.
Test Plan: Works with the bluetooth backend on 4G (i.e. no album art is downloaded). Still downloads album art otherwise, as expected.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D11682
Summary:
This adds some simple explanation to the `identityPacketReceived` and
`addLink` methods.
Test Plan: N/A
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Differential Revision: https://phabricator.kde.org/D11672
Summary: The image is shown, similar to when you take a screenshot.
Test Plan: Works great! Doesn't crash for non-images.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D11679
Summary: If the album art is a file url, the code will ask the remote device to transfer that file. It's then stored in the album art cache.
Test Plan: Works fine for me, even when quickly skipping songs.
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11018
Summary:
Adds the album art to the media notification and lock screen.
How it looks on my phone (disregard the somewhat weird look, that's just the weird UI my phone vendor uses):
{F5728066}
Google images shows how it'll look on other phones (this one includes the lock screen image):
{F5728069}
And Android Oreo automatically colors the notification based on the album art color (untested, but should work):
{F5728070}
Test Plan: Changes are minor and it works fine for me.
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D10798
Summary:
MPrisPlugin previously made two calls to `requestPlayerList()` in its
`onCreate()` method. This change deletes the first of those, so that
only one network packet is sent and received.
Test Plan:
Pair a new device, confirm that only one request for media players is
received by remote client.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Differential Revision: https://phabricator.kde.org/D11648
Summary:
The vector icons were rastizered for older Android versions, but these were on the small side. This fixes the size.
BUG: 392061
Test Plan: The icons aren't blurry anymore on Android 4.2.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D11644
Summary:
So switching (currently playing) players in the app will also switch the
notification.
Test Plan: Tested with two players playing at the same time, and switching between them.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D11647
Summary:
The buttons are now hidden, and only showed once we know that the device
is unpaired.
Test Plan: Pairing, pairing request and opening a device still work.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: #kde_connect
Differential Revision: https://phabricator.kde.org/D11627
Summary: As @kossebau mentioned, a disappearing "previous" button is not really great, since you'll likely press "next". This diff makes sure that when you can press previous and/or next, both buttons are shown (potentially disabled).
Test Plan: Works in all combinations of enabled/disabled for both buttons
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: kossebau, #kde_connect
Differential Revision: https://phabricator.kde.org/D11437
Summary: KDE Connect, now with correct naming!
Test Plan: It still builds.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: nicolasfella, apol
Differential Revision: https://phabricator.kde.org/D11035
Summary: Add an ActionBar entry for adding a command to the list. The current way to add commands is quite hidden.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: philipc, mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7959
Summary: Won't have a practical impact, but Lint is happy
Test Plan: Add entries to ip list
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10949
Summary: Some languages have more plurals than the english language. This enables translaters to select the appropriate plural form.
Test Plan: No change in english
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11001
Summary:
This prevents issues with buttons jumping around when canPlay/canPause is false, as some mpris players do not report consistent values.
Additionally, gives the play/pause button a bit more attention when enabled. What do you think?
When playing/pausing is enabled (i.e. nearly always):
{F5728047}
When disabled:
{F5728048}
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella
Differential Revision: https://phabricator.kde.org/D10796
Summary:
Depends on D10905
Use proper API
Test Plan: Pairing a device and using the drawer is still possible.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10934
Summary:
Depends on D10905
Convert to local variables where Android Studio suggested
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10911
Summary: Sorry for the huge diff, but all I did was applying Android Studio's 'Reformat Code' to all files. If everyone does that before submitting a patch we can keep it clean easily.
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10905
Summary: Sorry for the huge diff, but all I did was applying Android Studio's 'Reformat Code' to all files. If everyone does that before submitting a patch we can keep it clean easily.
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10905
Summary:
Gwenview is adding MPRIS support in D10972. I tested it and noticed that it was quite buggy. Turns out,
Gwenviews implementation is (almost) fine, the problem was on our side. Unlike pure music players like
Spotify Gwenview changes canPlay, canPause, canGoNext and canGoPrevious when needed, but those updates
didn't reach our UI. The packages containing those updates were not parsed because they didn't contain
several fields.
Test Plan: Controlling Spotify and Gwenview (patched to support playPause) works fine now.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10981
Summary:
Android has a rate limit for updating notifications which was reduced
from 50 to 10 updates/sec since Nougat.
The share plugin updates the progress every time the percentage changes.
The final notification update which makes the notification removable,
is ignored if this happens more than 10 times in a second.
This patch reduces the progress updates to a maximum of 10 times per second.
BUG: 391059
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10976
Summary:
BUG:385796
Make encryption info available while there is no device paired. Previously, the menu option to show it was hidden when not connected.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Maniphest Tasks: T7212
Differential Revision: https://phabricator.kde.org/D10841
Summary: Previously, the MPRIS activity just showed the first player in the list when you opened the activity. Now it shows a playing player, when possible.
Test Plan: Tested with zero, one and multiple players, and with both playing and not playing players.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Differential Revision: https://phabricator.kde.org/D10821
Summary:
In the remote input activity, the keyboard button was in the overflow menu, even though it fit on the navigation bar. The previous code used the wrong namespace, so this fixes it.
BUG: 390640
Before:
{F5729325}
After:
{F5729326}
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D10827
Summary:
The notification plugin now sends small notification icons, if the large
icon is not available.
Before patch, with icon:
{F5698607}
{F5698608}
Before patch, without icon:
{F5698612}
{F5698613}
After patch, without icon:
{F5698614}
{F5698616}
Test Plan: I tested notifications with small icons and those with large icons, and it works as expected.
Reviewers: #kde_connect, #vdg, fabianr, albertvaka
Reviewed By: #kde_connect, #vdg, fabianr, albertvaka
Subscribers: albertvaka, mmustac, fabianr, apol, nicolasfella
Differential Revision: https://phabricator.kde.org/D10165
Summary:
BUG: 337485
Adds a notification to show and control mpris players. It shows the title, artist etc. (so depends on D9083, but can easily be adapted to work without it, but that leads to less features).
The notification appears as soon as one of your connected devices plays music. If multiple devices/players are playing, it shows the information and controls for only one of these. If it stops playing, it tries to switch to another playing device/player. If those do not exist, it shows the same player, but allows starting it again.
Dismissing the notification is only possible if the showed player is paused (as effect, only when all players are paused). It automatically closes if the device or player disappears or disconnects and no other players are playing. I think this behaviour is intuitive, other native android music players have similar behaviour.
About the implementation: there are two parts to this: the notification and the media session control API. The first shows the notification and its controls. The second allows lock screen controls on older Android versions and control using e.g. headphone buttons. Since nearly all code is shared between the two parts, and the rest is mostly straightforward, I put them in the same diff.
Test Plan:
Tested on Android Nougat 7.1 (shows the notification with buttons, as expected; no lock screen controls, as expected) and Android Gingerbread 2.3 (shows a notification without buttons, lock screen controls work, so as expected).
I am not able to test with multiple desktops, so testing that would be appreciated.
Disabling buttons when not available should work, but all players I tested always allowed next/previous/play/pause.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: apol, albertvaka, nicolasfella
Tags: #kde_connect
Maniphest Tasks: T6512
Differential Revision: https://phabricator.kde.org/D9266
Summary:
Fetches http(s) album art urls, as supplied by MPRIS, to display as album art. Fetched urls and failed fetches are cached to prevent unneccessary network activity.
The bulk of the code is in the fetching+caching class `AlbumArtCache`.
Takes the comments from d52be10 into account:
- The images (HTTP(S) only for now) are cached. This is limited to 5 MB on disk or 10 entries in memory.
- The image gets viewing space depending on the remaining screen space. Thus, controls should never be pushed off-screen.
- "Edge cases" like going from cover art to no cover art is handled correctly (actually a result of earlier mpris code changes).
Additionally, it adds a landscape mode to the MPRIS activity, which shows the cover art and controls side by side.
Desktop part is in D9563.
FEATURE: 345015
Test Plan: Works both with/without album art. Switching players and tracks correctly changes the album art.
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, ngraham, nicolasfella, apol
Differential Revision: https://phabricator.kde.org/D9564
Summary:
Depends on D10519
Allow to specify a newline separated list of blocked numbers. This can be useful for 2FA/TAN that could be leaked to the desktop.
The protection is incomplete because the notification might be leaked trough the notificationsplugin anyway (T6651).
Test Plan:
Block my number, send SMS to self -> only notification from Notificationsplugin is shown.
Unblock it again -> both notifications are shown
Reviewers: #kde_connect, albertvaka, mtijink
Reviewed By: #kde_connect, albertvaka, mtijink
Subscribers: mtijink, albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10520
Summary:
BUG: 379023
Let users choose a ring tone in the settings.
Test Plan: Open settings, choose a ringtone, search for device.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: mtijink, andyholmes, albertvaka, apol, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10332
Summary:
BUG: 368089
FindMyPhone does not loop ringtones, which makes problems with short ringtones. Additionally, it depends on the volume of the alarm channel, so if the alarms are muted, no
sound can be heard. This patch raises the alarm volume to max when the activity gets started and restores the previous value when it stops.
Test Plan: Trigger findmyphone, hear sound looping. Set alarm volume to zero and check if it gets restored.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9947
Summary: There is no need to implement a custom view for that. It is only used in MPRIS Activity, which looks almost the same now, except that the play button aligns with the buttons beneath, which is better IMHO.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9520
Summary:
The SSL/TLS handshake code in LanLinkProvider is normally invoked in parallel, so that multiple incoming messages can be read at once. However, this logic causes an unusual crash in Android 8.1's native openssl library.
Sample logcat of crash is available at https://paste.kde.org/ptolqcpya
This patch mitigates the issue by making the `addLink` function in that class synchronized. I recommend future work to determine whether there are any other thread-safety concerns in the handshake code.
Test Plan:
1. Designate a test wi-fi network
2. Disconnect all KDE Connect devices from that network
3. Install build on disconnected Android 8.1 device
4. Clear KDE Connect app data (if present) on 8.1 device
5. Connect 8.1 device to test wi-fi network
6. Connect any other KDE Connect device to test wi-fi network
Reviewers: albertvaka
Reviewed By: albertvaka
Differential Revision: https://phabricator.kde.org/D9739
Summary:
When the plugin is created all current notifications are sent to the other device. When the NotificationListener is not ready at that time this is delayed until it is. This was intended before, but did not work because the
requestAnswer flag was set on the network packages. The desktop ignored those packages. I see no purpose for the requestAnswer flag so I removed it.
Depends on D9622
Test Plan: Create some notifications. Restart the desktop or the app and look for the notifications on the desktop
Reviewers: #kde_connect, mtijink, albertvaka
Reviewed By: #kde_connect, mtijink, albertvaka
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9558
Summary: It doesnt seems to be useful any more
Test Plan: Android Studios Safe delete found no usage
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9623
Summary:
Set access to (package) private where possible
Depends on D9620
Reviewers: #kde_connect, mtijink
Reviewed By: mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9621
Summary:
Depends on D9546
Depends on D9619
Make use of the new minSdk feature.
Reviewers: #kde_connect, mtijink
Reviewed By: mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9548
Summary:
Each plugin gets a minSdk level assigned. If this level isn't available the plugin doesn't get loaded. This can simplifie the plugin code by removing reccuring Sdk version checks.
Should we let the user know that a plugin is not available due to that or should it fail silently?
Actual Plugin adaptions come in follow-up patches.
Reviewers: #kde_connect, mtijink
Reviewed By: mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9546
Summary: They are provided by the gradle build file.
Test Plan: I checked the generated merged manifest file.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Differential Revision: https://phabricator.kde.org/D9562
Summary: Bring law and order to the coding style
Reviewers: #kde_connect, mtijink
Reviewed By: mtijink
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9619
Summary:
Arch linux recently updated libraries which dropped support for RC4, used for connections to Android before Android 3 Honeycomb. Other distributions may also be affected (or will be affected in the future).
This adds a new cipher, supported by Android API 9+.
Test Plan: With this change (and corresponding desktop change) the app can connect again.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Differential Revision: https://phabricator.kde.org/D9449
Summary: Receives the title, artist and album information from MPRIS, instead of a single "artist - title". The desktop counterpart is in D8957.
Test Plan: Works for me, both with and without D8957.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D9083
Summary:
Since Android Nougat, the previous way to open a file shared to android did not work anymore (using `file://` urls), as marked with a TODO.
This diff implements the new way of opening files: a content provider url (`content://`) allows opening files through the KDE Connect app. As an added benefit, apps without external files permission can now open files received by KDE Connect.
Test Plan: Works for me.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella
Differential Revision: https://phabricator.kde.org/D9331
Summary:
Makes sure the MPRIS data is always up-to-date, so requesting updates
separately is never necessary. Also provides a way to remove callbacks.
Test Plan: All information still appears in the MPRIS activity and the controls still work.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Differential Revision: https://phabricator.kde.org/D9084
Summary: The previous icons were old (pre-Material, maybe even pre-Holo). The recommended practice now is to add the icons directly to your app, so I added the material icons. Note that the vector version is used; these are automatically converted to bitmaps for older android versions.
Reviewers: #kde_connect
Subscribers: apol
Differential Revision: https://phabricator.kde.org/D8955
Summary:
This directly fixes a couple of bugs (where the UI was not updated in all cases) and will allow different code parts to use different players without clashing with each other.
This is required for sensible behaviour while using the media control notification (which I plan to work on).
Reviewers: #kde_connect, thomasp, albertvaka
Reviewed By: #kde_connect, thomasp, albertvaka
Subscribers: albertvaka, apol, thomasp
Differential Revision: https://phabricator.kde.org/D8942
Summary:
Support Android 6 direct share.
BUG:362266
BackgroundService is a SIngleton now. This should only be used if strictly necessary.
Test Plan: Pick a random app with a share button, look for device entries in Sharing options (might not be there because other sharing options have higher priority)
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D6743
Summary:
Some refactoring in the Shareplugin:
Extracted some parts into separate methods
Extracted notification into separate class
Some optical tweaks on notifications
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D6613
Summary: Some values in the mousepad plugin had no default values because some strings were translated but shouldn't.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D6097
Summary: These changes allow replying to any notifications that offer quick reply text fields (like WhatsApp). Does work for WhatsApp. Does not work for Telegram.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka
Maniphest Tasks: T4674
Differential Revision: https://phabricator.kde.org/D5991
Summary:
The SMS protocol does not support sending a message longer than 160 characters. Android's SmsManager.sendTextMessage(..) fails to send in case the message is too long.
Instead of failing, check the message length. If it is longer than 160 characters, break it up and send it as several messages
On receive, collect the list of messages, then combine their bodies
Test Plan:
Send a long message via KDE Connect and verify that it is actually sent
Send a short message via KDE Connect and verify that it can also be sent
Ideally: Test sending a message which is the maximum length for an SMS (160 characters) and verify that it is sent as exactly one SMS (And billed properly)
Receive a long message and verify that it is delivered as a single long message, even though we all know that it was transmitted as a multi-part SMS
Receive a short message and verify that it is correctly delivered
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka
Differential Revision: https://phabricator.kde.org/D5848
Any interface with "rmnet" in it is an internal interface that has to do
with the device's cellular connection or USB tethering. Since those
interfaces might give IPv4 addresses that are unreachable from any other
device, this change makes getLocalIpAddress ignore anything rmnet-related.
BUG: 337685
Some additional fields are transferred in a network package. This includes
the payloads MD5 checksum (which determines where the image file is stored)
and the notifications title and text (which allows more flexibility in the
desktop app, ticker is still transferred for compatibility)
REVIEW: 130033
@@ -4,22 +4,34 @@ KDE Connect is a multi-platform app that allows your devices to communicate (eg:
## (Some) Features
- **Shared clipboard**: copy and paste between your phone and your computer (or any other device).
- **Notification sync**: Read your Android notifications from the desktop.
- **Notification sync**: Read and reply to your Android notifications from the desktop.
- **Share files and URLs** instantly from one device to another.
- **Multimedia remote control**: Use your phone as a remote for Linux media players.
- **Virtual touchpad**: Use your phone screen as your computer's touchpad.
- **Virtual touchpad**: Use your phone screen as your computer's touchpad and keyboard.
All this without wires, over the already existing WiFi network, and using a secure, encrypted protocol.
All this without wires, over the already existing WiFi network, and using TLS encryption.
## About this app
This is a native Android port of the KDE Connect Qt app. You will find a more complete readme about KDE Connect [here](https://github.com/albertvaka/kdeconnect-kde).
This is a native Android port of the KDE Connect Qt app. You will find a more complete readme about KDE Connect [here](https://invent.kde.org/network/kdeconnect-kde/).
## How to install this app
You can install this app from the [Play Store](https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp) as well as [F-Droid](https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp). Note you will also need to install the [desktop app](https://github.com/albertvaka/kdeconnect-kde) for it to work.
You can install this app from the [Play Store](https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp) as well as [F-Droid](https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp). Note you will also need to install the [desktop app](https://invent.kde.org/network/kdeconnect-kde) for it to work.
## Contributing
A lot of useful information, including how to get started working on KDE Connect and how to connect with the current developers, is on our [KDE Community Wiki page](https://community.kde.org/KDEConnect)
For bug reporting, please use [KDE's Bugzilla](https://bugs.kde.org). Please do not use the issue tracker in GitLab since we want to keep everything in one place.
To contribute patches, use [KDE Connect's Gitlab](https://invent.kde.org/kde/kdeconnect-android/).
On Gitlab (as well as on our [old Phabricator](https://phabricator.kde.org/tag/kde_connect/)) you can find a task list with stuff to do and links to other relevant resources.
It is a good idea to also subscribe to the [KDE Connect mailing list](https://mail.kde.org/mailman/listinfo/kdeconnect).
Please know that all translations for all KDE apps are handled by the [localization team](https://l10n.kde.org/). If you would like to submit a translation, that should be done by working with the proper team for that language.
## License
[GNU GPL v2](https://www.gnu.org/licenses/gpl-2.0.html) and [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html)
If you are reading this from Github, you should know that this is just a mirror of the [KDE Project repo](https://projects.kde.org/projects/extragear/network/kdeconnect-android/repository/).
If you are reading this from Github, you should know that this is just a mirror of the [KDE Project repo](https://invent.kde.org/network/kdeconnect-android/).
implementation'com.jakewharton:disklrucache:2.0.2'//For caching album art bitmaps
implementation'com.jaredrummler:android-device-names:1.1.9'//To get a human-friendly device name
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:appcompat-v7:25.1.1'
compile'com.android.support:design:25.1.1'
implementation'org.apache.sshd:sshd-core:0.14.0'
implementation'org.apache.mina:mina-core:2.0.19'//For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8 (api 26)
compile 'org.apache.sshd:sshd-core:0.8.0'//0.9 seems to fail on Android 6 and 1.+ requires java.nio.file, which doesn't exist in Android
//implementation('com.github.bright:slf4android:0.1.6') { transitive = true } // For org.apache.sshd debugging
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.