import export function for discovered contacts#373
Conversation
6ad2c2c to
7c76899
Compare
446564
left a comment
There was a problem hiding this comment.
I will test today on a few devices
| return List.unmodifiable(_discoveredContacts); | ||
| } | ||
|
|
||
| String exportDiscoveredContactsJson() { |
There was a problem hiding this comment.
I don't think discovered contacts are part of the connector as they are persisted in app only
There was a problem hiding this comment.
I would opt for a discovered contacts service or just part of the discovered contacts storage
There was a problem hiding this comment.
I wanted to write as less change as possible and the there was already the connection for "import" newly discovered messages from companion into the store.
There was a problem hiding this comment.
these are not on the companion however, but in the app. so I think the discovered contacts storage is a better location.
|
after the changes feel free to amend your previous commit and force push |
|
seems to be working well on linux and android, the only issue which is possibly unrelated is that on android you can't save the file. only share to apps. |
Yes you would have to share to a file manager. I tried to make it to save as file on android, but I always ended up with only storing it in the not accessible app storage, where it also will be deleted on app uninstall. |
I think this is the same behavior with contacts export so we can always add other options later for both. |
|
sorry what I meant was, instead of adding the import and export for discovered contacts into the meshcore_connector, that it should just have been added to the existing contact_discovery_store. |
I don't know how to make this going to work, because I need the instantiated object, which is only available in the connector. We have now two implementation my first commit, which has the least impact and the one where it is as its own service. Sincerely Eric |
|
Should I make a new Pull-Request with a Cherry-Pick of the first commit onto the current dev branch? |
whatever is easier for you is fine. |
|
See PR #436 for cherrypick of first variant. |
Made the changes for importing and exporting Discovered contacts as JSON files.
This is according to Issue #352 (and based on now obsolete #298).
I also cleaned up the code a bit, and this is the isolated import/export functionality.
There was just on thing. there was a contactfield "wasPulled" which seemed to should have the same functionality as the existing "isActive" flag, but was not used anywhere, therefore I removed it. (I hope thats ok.)
Tested it on Android, needs Testing on other Platforms.
Best Regards Eric