2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

139 Commits

Author SHA1 Message Date
Erik Duisters
9fb780f919 Migrate from PreferenceActivity to PreferenceFragment because it has been deprecated since Android 3.0 API11
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
2019-01-06 12:36:42 +01:00
Erik Duisters
f684fbe8ef Migrate from android support libraries to androidx
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
2018-12-27 16:43:34 +01:00
Alex Kovrigin
6ba6842fc7 Privacy Options for Notifications Forwarded to Desktop
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
2018-12-12 19:11:42 -07:00
Erik Duisters
15ff0fca2b Make DeviceFragments listview use full screen width so the over scroll indicator looks better
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
2018-12-09 18:55:24 +01:00
Erik Duisters
2402b11608 Incorporate more Material Design components
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
2018-12-09 18:51:12 +01:00
Erik Duisters
53422e0900 Use android:theme instead of app:theme because it is deprecated
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
2018-12-09 18:40:25 +01:00
Nicolas Fella
2bc059c4b6 Avoid hardcoded string 2018-10-29 19:58:44 +01:00
Nicolas Fella
0c7b970eae Add content description 2018-10-27 00:59:58 +02:00
Nicolas Fella
2410782662 Fix XML warnings 2018-10-27 00:39:41 +02:00
Nicolas Fella
c1426584c1 Fix id 2018-10-26 23:59:20 +02:00
Nicolas Fella
7a24310cea Remove unneeded version checks
We require API 14 now which makes some checks needless
2018-10-26 22:51:13 +02:00
Nicolas Fella
abd45cfc06 Remove unneeded files
Restores the look we wanted since D12290
2018-10-24 12:43:12 +02:00
Nicolas Fella
e4ffd3d3cf Enable (de)selecting all apps in notification filter
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
2018-09-30 19:34:07 +02:00
Nicolas Fella
877cf67347 Fix volume icon on dark theme 2018-08-01 23:45:32 +02:00
Nicolas Fella
d720684af6 Fix layoout file formatting 2018-08-01 23:42:36 +02:00
Albert Vaca
8d9d15e6dd Added a plugin to present slideshows
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
2018-08-01 14:27:57 +02:00
Nicolas Fella
e0fde16525 Added runcommandplugin widget
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
2018-07-30 18:15:25 +02:00
Nicolas Fella
f81cf3bf36 Don't draw list dividers
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
2018-07-27 23:40:51 +02:00
Nicolas Fella
f9c30148b7 System volume plugin Android
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
2018-07-27 09:20:18 +02:00
Nicolas Fella
3e05b70803 Support MPRIS stop
Summary:
Fixes T9070

{F5950736}

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T9070

Differential Revision: https://phabricator.kde.org/D13709
2018-07-27 07:47:45 +02:00
Nicolas Fella
d83091faf8 Give clearer names
Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12217
2018-07-27 07:46:34 +02:00
Nicolas Fella
4deeb5e061 Send Runcommand setup package from phone
Summary: Also remove some leftover code from the prevoius attempt

Test Plan: Open command list, click Floating Action Button, look for KCM window on desktop.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12332
2018-05-10 19:47:15 +02:00
Philip Cohn-Cort
a1f1693d0b Add a dark theme
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
2018-04-23 18:35:43 +02:00
Nicolas Fella
bc330018e1 Rename list layout
Summary: Give it a proper name

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12289
2018-04-17 20:50:23 +02:00
Matthijs Tijink
eb801fa535 Don't show flash of pairing buttons when opening a device
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
2018-03-24 11:07:46 +01:00
Nicolas Fella
fbeb5523b4 Use sp instead of dp for text size
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11016
2018-03-04 14:40:16 +01:00
Nicolas Fella
ae0538ae0c Make it possible to add commands for the RunCommandsPlugin from Android
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
2018-03-04 14:38:20 +01:00
Nicolas Fella
22e65626cc Fix accessibility issues
Summary: Add some image contentDescriptions and one focusable property

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11004
2018-03-04 13:18:21 +01:00
Nicolas Fella
961f8e0308 Delete unused file
Test Plan: Android Studios Safe delete did not find any usage

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11005
2018-03-04 13:17:51 +01:00
Nicolas Fella
8d9681a05d Avoid empty XML tags
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11006
2018-03-04 13:16:22 +01:00
Matthijs Tijink
59f72f658a Change mpris play/pause button color instead of removing it
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
2018-03-04 11:54:40 +01:00
Nicolas Fella
e72e0f61dd Rename MaterialActivity to MainActivity
Summary: Its more descriptive

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10951
2018-03-03 19:35:29 +01:00
Nicolas Fella
b54d4948d7 Remove commented code for real 2018-03-03 16:22:28 +01:00
Nicolas Fella
fa5a37c472 Apply coding style to whole project
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
2018-03-03 16:09:52 +01:00
Matthijs Tijink
0d00b8aa4a Add album cover art support.
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
2018-02-24 16:21:11 +01:00
Nicolas Fella
de7d944230 Get rid of MaxWidthImageButton
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
2018-02-01 11:45:28 +01:00
Nicolas Fella
8e2757ecf3 Fix context in layout files
Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9524
2018-01-02 18:18:31 +01:00
Nicolas Fella
52f2067e55 Silence a warning in preference_with_button.xml
Summary: Using @android:id instead of @+android:id silences two Code Inspection errors

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9523
2018-01-02 18:17:21 +01:00
Matthijs Tijink
044261ceb1 Use material icons in MPRIS activity
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
2017-12-01 21:27:35 +01:00
Zixing Liu
bf230509b8 Add swipe to refresh to device pairing activity
This makes it more conform to material design standard

REVIEW: 129980
2017-03-18 02:16:00 +01:00
Albert Vaca
b24010a86e Try a different approach to detect when on mobile data. 2017-02-25 21:22:20 +01:00
Albert Vaca
e2a932558a Revert "Do not broadcast in 3G + info message"
As it couldn't be any other way, this broke somebody's workflow.

This reverts commit 440a12f86c8db63cc3a85d3a4e05c3e62eb31f19.
2017-02-25 21:07:04 +01:00
Albert Vaca
440a12f86c Do not broadcast in 3G + info message 2017-02-18 19:06:37 +01:00
Albert Vaca
d52be109ee Revert "Add support to deal with album arts sent by mpris plugin."
This was very poorly implemented and can't stay as it is right now:
 - Every second or so the art image was being loaded from disk, scaled,
   base64 encoded and sent over the freakin network!
 - The Android interface didn't take into account small screens, and
   adding the image would cut stuff out of the screen.
 - Didn't manage "edge cases" like playing a song without cover after one
   with cover (previous image was still being shown) or changing players.

This reverts commit 24c404400f6e5092d38d4e26a948777c1545ca2b.

# Conflicts:
#	src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
#	src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisPlugin.java
2016-12-08 23:47:17 +01:00
Albert Vaca
3b5a7deebe Rewritten the Notification Filter.
- Now we display every app in the phone.
- We show the app icon next to the name.
- Some apps can now be disabled by default.

Disabled notifications for the default Android messaging app, as SMS
notifications are already handled by the telephony plugin.

BUG: 367930
2016-09-20 12:46:28 +02:00
Albert Vaca
66cdb77bbd Fixed margins of notification filter activity 2016-09-20 10:48:06 +02:00
Albert Vaca
91eefcc65a Fixed margins in the settings activity 2016-09-19 16:16:30 +02:00
Albert Vaca
1a04bfbbea Fixed simple issues detected by lint 2016-06-21 16:44:21 +02:00
Pinak Ahuja
24c404400f Add support to deal with album arts sent by mpris plugin.
We should probably look into resizing the album art according
 to the DPI of the device.
2016-06-16 10:37:04 +02:00
Albert Vaca
0836453c35 Project-wise optimize imports 2016-06-09 13:42:54 +02:00