KDE Community

[KDE Connect] Refactor Duplicated Code in KDE Connect Android-side SMS Helper

KDE Connect is an open-source application which provides integration for your phone and your desktop, such as allowing you to use your phone as a wireless trackpad and presentation remote, or for replying to incoming text messages from your computer. Come and be a part of building a transparent and secure bridge to simplify your world!

KDE Connect's SMS helper has two blocks of very similar code, in getMessagesWithFilter and getConversations. The return types of both methods are somewhat different which means a bit of thought would have to be applied in order to build a helper method which can service both methods.

To complete this task, you will need to be able to build the latest version of the KDE Connect desktop app and you will need to set up Android Studio to build your solution. You will need an Android smartphone with SMS messages to test your changes.

Here is a link to the relevant file in our git browser, for a preview of the code in question: https://cgit.kde.org/kdeconnect-android.git/tree/src/org/kde/kdeconnect/Helpers/SMSHelper.java

You might want to make sure you can build the Android app first. There is a task for it! https://codein.withgoogle.com/dashboard/tasks/6005593824296960/

Task tags

  • kde
  • android
  • java
  • kdeconnect
  • refactoring

Students who completed this task

waleko

Task type

  • code Code
close

2018