Last indexation completed on 2024-03-03 06:15:46 UTC

Writing a plugin for KDE Connect
For the desktop client (this project):
1. Enter the "plugins" directory. 2. Copy the "ping" under a different name ("findmyphone" in this example). 3. Add "add_subdirectory(findmyphone)" to CMakeLists.txt after the others "add_subdirectory". 4. Enter the new "findmyphone" directory. 5. Edit CMakeLists.txt by replacing "ping" with "findmyphone". 6. Rename other files in this directory by replacing "ping" with "findmyphone" 7. Write a description of your plugin into "README" 8. Edit findmyphoneplugin.cpp and findmyphoneplugin.h. A. Change license header. B. Replace (case sensitive) "ping" with "findmyphone", "PingPlugin" with "FindMyPhonePlugin" and "PING" with "FINDMYPHONE". 9. Edit kdeconnect_findmyphone.json file: A. Replace "ping" with "findmyphone". B. Change name, description, icon, author, email, version, website, license info. C. Remove all the translations D. Set X-KDEConnect-SupportedPacketType and X-KDEConnect-OutgoingPacketType to the packet type your plugin will receive and send, respectively. In this example this is "kdeconnect.findmyphone". Make sure that this matches what is defined in the findmyphoneplugin.h file (in the line "#define PACKET_TYPE_..."), and also in Android. 10. Now you have an empty skeleton to implement your new plugin logic.


SEE ALSO: README.txt

  Name Size Date (UTC) Last indexed Description
  Name Size Date (UTC) Last indexed Description
folder Parent directory - 2024-02-11 01:50:27  
folder battery/ - 2024-02-11 01:50:27

This plugins receives packages with type "kdeconnect.battery" and reads the following fields:
isCharging (boolean): If the battery of the peer device is charging currentCharge (int): The charge % of the peer device thresholdEvent (int) [optional when = 0, see below]: means that a battery threshold event were fired on the remote device: 0 := no event. generally not transmitted. 1 := battery entered in low state This is an int so in the future we'll be able to subscribe to more events. (see BatteryPlugin.ThresholdBatteryEvent)


SEE ALSO: README

folder bigscreen/ - 2024-02-11 01:50:27  
folder clipboard/ - 2024-02-11 01:50:27

When the clipboard changes, it sends a package with type kdeconnect.clipboard and the field "content" (string) containing the new clipboard content.
When it receivest a package of the same kind, it should update the system clipboard with the received content, so the clipboard in both devices always have the same content.
This plugin is symmetric to its counterpart in the other device: both have the same behaviour.

folder connectivity-report/ - 2024-02-11 01:50:27

This plugins receives packages with type "kdeconnect.connectivity_report" and reads the following fields:
signalStrengths (object<string, object>): Maps each SIM (subscription ID) to the following object: networkType (string): One of "5G", "LTE", "CDMA", "EDGE", "GPRS", "GSM", "HSPA", "UMTS", "CDMA2000", "iDEN", "Unknown" signalStrength (int) [0..=4]: The signal strength
It also sends empty packages with type kdeconnect.connectivity_report.request to ask the peer device to send a package like the mentioned above.

folder contacts/ - 2024-02-11 01:50:27

This plugin allows communicating with the paired device to access its contacts book, either by downloading the entire list of contacts or by requesting a specific contact

folder findmyphone/ - 2024-02-11 01:50:27  
folder findthisdevice/ - 2024-02-11 01:50:27  
folder lockdevice/ - 2024-02-11 01:50:27  
folder mmtelephony/ - 2024-02-11 01:50:27

This plugin will display a notification each time a package with type "kdeconnect.telephony" is received. The type of notification will change depending on the contents of the field "event" (string).
Valid contents for "event" are: "ringing", "talking", "missedCall" and "sms".
If the incoming package contains a "phoneNumber" string field, the notification will also display it. Note that "phoneNumber" can be a contact name instead of an actual phone number.
If the incoming package contains "isCancel" set to true, the package is ignored.

folder mousepad/ - 2024-02-11 01:50:27

When the user moves his on the phone, dx and dy (The difference between the last movement and the current movement of the X and Y Axis respectively) is sent inside a NetworkPackage QCursor is used to move mouse cursor according to its relative position.
When the user tap or double taps his phone, a mouse key button is simulated using XTestFakeButtonEvent

folder mpriscontrol/ - 2024-02-11 01:50:27

This plugin controls the playback of mpris-enabled applications in this device, commanded by its counterpart in the other device that acts as a remote control. That means both plugins are not symmetrical.
This plugins receives and sends packages with type kdeconnect.mpris.
It keeps a list of detected players it can control via MPRIS. When it receives a package that contains the boolean "requestPlayerList" set to true, it will send back the list of players in an array named "playerList". If a new player is detected or a known one dissappears, it should also send this list. Note that players are identified only by its name (its MPRIS Identity), so there can not be two players with the same display name.


SEE ALSO: README

folder mprisremote/ - 2024-02-11 01:50:27  
folder notifications/ - 2024-02-11 01:50:27

This plugin listens to packages with type "kdeconnect.notification" that will contain all the information of the other device notifications.
The other device will report us every notification that is created or dismissed, so we can keep in sync a local list of notifications.
At the beginning we can request the already existing notifications by sending a package with the boolean "request" set to true.


SEE ALSO: README

folder pausemusic/ - 2024-02-11 01:50:27

This simple plugin will just listen to "kdeconnect.telephony" like the telephony plugin does. It reads the field "event", to see if it is "ringing" or "talking" and then pauses all the music/video players reachable through MPRIS. When the same kind of package is received but the boolean "isCancel" is set to true, it will resume the playback of all the paused sources.

folder ping/ - 2024-02-11 01:50:27

This plugin displays a notification to the user each time a package with type "kdeconnect.ping" is received. If the package has something in the "message" field, that will be displayed in the notification body.

folder presenter/ - 2024-02-11 01:50:27  
folder remotecommands/ - 2024-02-11 01:50:27  
folder remotecontrol/ - 2024-02-11 01:50:27  
folder remotekeyboard/ - 2024-02-11 01:50:27

Sends key-events to remote devices. The payload structure corresponds basically to that of remote key-presses in the mousepad-plugin (with the exception of the "sendAck"-flag) , e.g.:
{ "key": "a", "specialKey": 12, "shift": false, "ctrl": false, "alt": false, "sendAck": true }


SEE ALSO: README

folder remotesystemvolume/ - 2024-02-11 01:50:27  
folder runcommand/ - 2024-02-11 01:50:27  
folder screensaver-inhibit/ - 2024-02-11 01:50:27

This plugin inhibits the screensaver from kicking in when the device is connected to kdeconnect, it then uninhibits the screensaver if the device was to go out of range or be disconnected.

folder sendnotifications/ - 2024-02-11 01:50:27  
folder sftp/ - 2024-02-11 01:50:27

This plugin receives packages with type "kdeconnect.sftp" and reads the following fields:
ip (string): ip of the currently active network on device port (string): port where sftp server starts user (string): username to connect to sftp server password (string): one session password to access sftp server path (string): root directory to access device filesystem
This plugin sends packages with type "kdeconnect.sftp" and fills the following fields:
startBrowsing (boolean): tell device to start sftp server and notify desktop

folder share/ - 2024-02-11 01:50:27

It receives a packages with type kdeconnect.share. If they have a payload attached, it will download it as a file with the filename set in the field "filename" (string). If that field is not set it should generate a filename.
If the content transferred is text, it can be sent in a field "text" (string) instead of an attached payload. In that case, this plugin opens a text editor with the content instead of saving it as a file.
If the content transferred is a url, it can be sent in a field "url" (string). In that case, this plugin opens that url in the default browser.

folder sms/ - 2024-02-11 01:50:27  
folder systemvolume/ - 2024-02-11 01:50:27

This plugin allows to control the system volume.

folder telephony/ - 2024-02-11 01:50:27

This plugin will display a notification each time a package with type "kdeconnect.telephony" is received. The type of notification will change depending on the contents of the field "event" (string).
Valid contents for "event" are: "ringing", "talking", "missedCall" and "sms". Note that "talking" is just ignored in this implementation, while the others will display a system notification.
If the incoming package contains a "phoneNumber" string field, the notification will also display it. Note that "phoneNumber" can be a contact name instead of an actual phone number.
If the incoming package contains "isCancel" set to true, the package is ignored.

folder virtualmonitor/ - 2024-02-11 01:50:27

This plugin will allow users to use other kde connect devices as external displays.
It will use krfb-virtualmonitor to create it and feed the information and also request an URL to be opened on the other device that should be rendering the contents.
Upon connection, we'll be notifying under kdeconnect.virtualmonitor about our "resolutions, which include objects with a "resolution" and a "scale". These will provide the information necessary to issue a remote feed.
When a virtual monitor is requested, kdeconnect.virtualmonitor.request will include a "url" field that contains all information necessary to connect to the created feed. The remote client needs to support this url type.

file CMakeLists.txt 1739 bytes 2024-02-11 01:50:27 -  
file kdeconnect.notifyrc 38812 bytes 2024-02-11 01:50:27 -  
file Messages.sh 146 bytes 2024-02-11 01:50:27 2024-03-03 05:09:37  
file README.txt 2184 bytes 2024-02-11 01:50:27 -