Review Request 129728: kdeconnect-android: Add remotekeyboard plugin

Albert Vaca Cintora albertvaka at gmail.com
Tue Jan 10 22:17:59 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129728/#review101932
-----------------------------------------------------------


Ship it!




I found some minor issues, but it works great so we can push it like this for now and address them in a separate patch :)

For not being an Android developer, you managed really good with all these Android APIs.


src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardPlugin.java (line 206)
<https://git.reviewboard.kde.org/r/129728/#comment68185>

    Doesn't Android implement this for us? If we just inject the Control + Arrow keys at once, I think it should already behave like this, without having to implement it ourselves.
    
    There is an (open source) keyboard called "Hacker's Keyboard" on the Play Store that has all the special keys like Ctrl, Shift, arrows, etc. And doing Ctrl + Shift + arrow with that keyboad works as expected, so I'm guessing that Android already implements this.



src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java (line 80)
<https://git.reviewboard.kde.org/r/129728/#comment68186>

    Isn't 'connected' equivalent to !instances.empty()? If it is, it might be better to not store 'connected' and just check '!instances.empty()' because with 'connected' there could be race conditions if two threads try to set it to true and false at the same time and they do it out of order.



src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java (line 168)
<https://git.reviewboard.kde.org/r/129728/#comment68181>

    There is only one option in settins, so maybe this button could take you to the main app instead of the settings?


- Albert Vaca Cintora


On des. 30, 2016, 8:57 a.m., Holger Kaelberer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129728/
> -----------------------------------------------------------
> 
> (Updated des. 30, 2016, 8:57 a.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Bugs: 370919
>     http://bugs.kde.org/show_bug.cgi?id=370919
> 
> 
> Repository: kdeconnect-android
> 
> 
> Description
> -------
> 
> Allow to receive keypress events from remote devices.
> 
> Notes / open issues / possible improvements:
> 
> - Pls. have a close look at the Android-code, that was written by a non-Android dev! ;-) Especially:
> 
> - Not sure if invocations of InputConnection::sendKeyEvents() from the thread triggering onPackageReceived() need to by async (using a Handler or so). Works fine for me as it is now, but maybe I'm not aware of some Android threading policies.
> 
> - So far no settings-activity for the ime defined to be launched from the OS settings. Should we?
> 
> - Handles a couple of special key-sequences so far: Shift+Arrows/Home/End (update selection), Ctrl+(Shift+)Arrows (jump/update selection by word), Ctrl+Enter (force Send/Go/... IME-Action), Ctrl+c/v/x/a (Copy/Paste/Cut/Select all)
> 
> - There is probably other behaviour that could be made configurable (like Ctrl+Return triggering IME-actions etc.)
> 
> 
> Diffs
> -----
> 
>   AndroidManifest.xml b1e1c51 
>   res/drawable-hdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-hdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-hdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-mdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xxhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_keyboard_hide_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_phonelink_off_white_36dp.png PRE-CREATION 
>   res/drawable-xxxhdpi/ic_phonelink_white_36dp.png PRE-CREATION 
>   res/values/dimens.xml 47c8224 
>   res/values/strings.xml 955b88d 
>   res/xml/remotekeyboardplugin_keyboard.xml PRE-CREATION 
>   res/xml/remotekeyboardplugin_method.xml PRE-CREATION 
>   res/xml/remotekeyboardplugin_preferences.xml PRE-CREATION 
>   src/org/kde/kdeconnect/Plugins/PluginFactory.java 1da88ef 
>   src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardPlugin.java PRE-CREATION 
>   src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java PRE-CREATION 
>   src/org/kde/kdeconnect/UserInterface/MaterialActivity.java c28e38c 
> 
> Diff: https://git.reviewboard.kde.org/r/129728/diff/
> 
> 
> Testing
> -------
> 
> Sure, on:
> - S2 (4.2.2, CyanogenMod)
> - Sony Z5 Compact (6.0.1)
> - Galaxy Tab 4 (5.0.2)
> - S3 Mini (4.1.2)
> 
> 
> Thanks,
> 
> Holger Kaelberer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170110/97ba5247/attachment-0001.html>


More information about the KDEConnect mailing list