[Android] New-style Message received handling
ClosedPublic

Authored by sredman on Sep 8 2018, 10:17 PM.

Details

Summary

Mark old-style SMS packet sending as deprecated (but still supported for backwards-compatibility with old Desktop apps)

Implement a ContentObserver on the Messages database, then send an update to the remote for all incoming or outgoing messages

Test Plan
  1. DBus
    • Connect Android to desktop
    • Subscribe to /modules/kdeconnect/devices/<device_id>/org.kdeconnect.device.conversations/conversationUpdated
    • Receive a new message (text yourself?)
    • Verify that something comes back on dbus (This endpoint is updated by D15409. With that patch you should see the new Message object, before you should just get the (meaningless) conversation ID)
  1. SMS App
    • Relies on D15409 - See instructions there

Diff Detail

Branch
message-synchonization
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2943
Build 2961: arc lint + arc unit
sredman created this revision.Sep 8 2018, 10:17 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptSep 8 2018, 10:17 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
sredman requested review of this revision.Sep 8 2018, 10:17 PM
sredman edited the summary of this revision. (Show Details)
sredman retitled this revision from New-style Message received handling to [WIP] New-style Message received handling.Sep 10 2018, 3:45 PM
sredman edited the summary of this revision. (Show Details)
sredman edited the test plan for this revision. (Show Details)
sredman updated this revision to Diff 41756.Sep 16 2018, 5:21 PM
sredman edited the test plan for this revision. (Show Details)

Implement ContentObserver to listen for incoming/outgoing messages and report those to the remote

sredman retitled this revision from [WIP] New-style Message received handling to New-style Message received handling.Sep 16 2018, 5:23 PM
sredman edited the summary of this revision. (Show Details)
sredman updated this revision to Diff 41758.Sep 16 2018, 5:31 PM

Header comments

sredman retitled this revision from New-style Message received handling to [Android] New-style Message received handling.Sep 16 2018, 5:33 PM
sredman updated this revision to Diff 41783.Sep 16 2018, 10:18 PM

Rebase onto master

nicolasfella added inline comments.
src/org/kde/kdeconnect/Plugins/SMSPlugin/SMSPlugin.java
211

Typo?

sredman updated this revision to Diff 41785.Sep 16 2018, 10:25 PM

Correct typo

sredman marked an inline comment as done.Sep 16 2018, 10:27 PM
nicolasfella accepted this revision.EditedSep 17 2018, 8:37 AM

Looks good from my quick testing and reading over it. I haven't taken a closer look at the Content observer thing though. I trust you to be around and fix anything wrong with it, so I think you can land it

This revision is now accepted and ready to land.Sep 17 2018, 8:37 AM
sredman closed this revision.Sep 17 2018, 3:06 PM

Looks good from my quick testing and reading over it. I haven't taken a closer look at the Content observer thing though. I trust you to be around and fix anything wrong with it, so I think you can land it

I agree that I am a little concerned by the ContentObserver, but from everything I could find this is the only (reasonable) way to capture SMS events on Android so hopefully it works for now and forever!