Warning, /network/kdeconnect-android/src/org/kde/kdeconnect/Plugins/README.txt is written in an unsupported language. File is not indexed.

0001 Writing a plugin for KDE Connect
0002 =================================
0003 
0004 For Android (this project):
0005 -----------------------------------------
0006 
0007 1. Change directory to src/org/kde/kdeconnect/Plugins.
0008 2. Copy "PingPlugin" under a different name ("FindMyPhonePlugin" in this example).
0009 1. Enter the new "FindMyPhonePlugin" directory.
0010 4. Rename "PingPlugin.java" to "FindMyPhonePlugin.java"
0011 5. Edit it. Replace (case sensitive) "Ping" with "FindMyPhone", "ping" with "findmyphone", "PING" with "FINDMYPHONE"
0012    and "plugin_ping" with "plugin_findmyphone".
0013 6. Open res/values/strings.xml. Find and copy the lines "pref_plugin_ping_desc" and "pref_plugin_ping" replacing "ping"
0014    with "findmyphone" and edit the plugin name and description between <string> </string>).
0015 7. Open src/org/kde/kdeconnect/Plugins/PluginFactory.java.
0016   A. Copy "import … PingPlugin" line with replacing "PingPlugin" with "FindMyPhonePlugin".
0017   B. Copy "PluginFactory.registerPlugin(PingPlugin.class);" line with replacing "PingPlugin" with "FindMyPhonePlugin".
0018 8. Open src/org/kde/kdeconnect/NetworkPacket.java. Copy a "public final static String PACKET_TYPE_PING = …" line
0019    replacing "PING" with the packet type you will be using (should match the desktop client).
0020 9. Now you have an empty skeleton to implement your new plugin logic.
0021 
0022 For the desktop client (project kdeconnect-kde):
0023 --------------------------------------
0024 
0025 1. Enter the "plugins" directory.
0026 2. Copy the "ping" under a different name ("findmyphone" in this example).
0027 3. Add "add_subdirectory(findmyphone)" to CMakeLists.txt after the others "add_subdirectory".
0028 1. Enter the new "findmyphone" directory.
0029 5. Edit CMakeLists.txt by replacing "ping" with "findmyphone".
0030 6. Rename other files in this directory by replacing "ping" with "findmyphone"
0031 7. Write a description of your plugin into "README"
0032 8. Edit findmyphoneplugin.cpp and findmyphoneplugin.h.
0033   A. Change license header.
0034   B. Replace (case sensitive) "ping" with "findmyphone", "PingPlugin" with "FindMyPhonePlugin" and "PING" with "FINDMYPHONE".
0035 9. Edit kdeconnect_findmyphone.desktop file:
0036   A. Replace "ping" with "findmyphone".
0037   B. Change name, description, icon, author, email, version, website, license info.
0038   C. Remove all the translations
0039   D. Set X-KDEConnect-SupportedPacketType and X-KDEConnect-OutgoingPacketType to the packet type your plugin will receive
0040      and send, respectively. In this example this is "kdeconnect.findmyphone". Make sure that this matches what is defined in
0041      the findmyplugin.h file (in the line "#define PACKET_TYPE_..."), and also in Android.
0042 10. Now you have an empty skeleton to implement your new plugin logic.
0043 
0044