T10650: Android<->Desktop SMS interface needs to account for deleted messages

Titir Adhikary noreply at phabricator.kde.org
Tue Sep 15 06:36:16 BST 2020


cubix added a comment.


  I went throught the smsplugin  in the c++ and the java side.
  
    private class MessageContentObserver extends ContentObserver {
    
            /**
             * Create a ContentObserver to watch the Messages database. onChange is called for
             * every subscribed change
             *
             * @param handler Handler object used to make the callback
             */
            MessageContentObserver(Handler handler) {
                super(handler);
            }
    
            /**
             * The onChange method is called whenever the subscribed-to database changes
             *
             * In this case, this onChange expects to be called whenever *anything* in the Messages
             * database changes and simply reports those updated messages to anyone who might be listening
             */
            @Override
            public void onChange(boolean selfChange) {
                // If the KDE Connect is set as default Sms app
                // prevent from reading the latest message in the database before the sentReceivers mark it as sent
                if (Utils.isDefaultSmsApp(context)) {
                    return;
                }
    
                sendLatestMessage();
            }
    
        }
  
  This is the code on the java side which sends the newest message. Should we create a change in this method so that it takes into consideration changes when messages are deleted as well?

TASK DETAIL
  https://phabricator.kde.org/T10650

To: cubix
Cc: aniketkumar, cubix, #kde_connect, sredman, lissacoffeey, venky, KunalRaghav, ankitbaluni, ankit, aliencode, Orage, ritwizsinha, dshelley, pawelkwiecinski, ctakano, vporvaznik, mschroeder, varunp, shivanshukantprasad, skymoore, fbampaloukas, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, domson, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, lemuel, menasshock, mikesomov, tctara, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20200915/9a8fe5bd/attachment-0001.htm>


More information about the KDEConnect mailing list