tmo1 / sms-ie

SMS Import / Export is a simple Android app that imports and exports SMS and MMS messages, call logs, and contacts from and to JSON / NDJSON files.
GNU General Public License v3.0
336 stars 39 forks source link

send json backup to url #61

Closed yesbuthow closed 1 year ago

yesbuthow commented 1 year ago

Hi, It would be great if the app could allow to enter a url in the backup destination to send the json.

tmo1 commented 1 year ago

Explain, please: send via what protocol? What software is running at the url in question?

In general, SMS I/E can potentially write to anything that is configured as a Document Provider in Android. This can be local storage, some types of cloud storage (e.g., Nextcloud), and possibly other things as well. If the destination you have in mind can be configured as a Document Provider, it might be possible to write the JSON to it.

yesbuthow commented 1 year ago

I was thinking something like pass the JSON data as a parameter in URL and receive it with via php get. I found in a discussion* that the process could be summarized as follows: 1) Take the JSON object and convert it to string (JSON.stringify) 2) Take the string and encode it in Base64 (you can find some useful info on this here 3) Append it to the URL and make the GET call 4) Reverse the process. decode and parse it into an object

*https://stackoverflow.com/questions/27577922/how-to-pass-a-json-array-as-a-parameter-in-url

yesbuthow commented 1 year ago

Otherwise would it be possible to add an automatic sending of backups to an ftp server?

tmo1 commented 1 year ago

These are interesting suggestions, but I don't plan to implement them, at least not in the forseeable future. As I noted above, SMS I/E currently exports via Android's Storage Access Framework (SAF), and thus has a single export method, utilizing standard Android APIs. Implementing and maintaining custom code to do HTTP or FTP would involve substantial coding work and additional code complexity.

Furthermore, the general goal of automatically storing exports on a remote system can be accomplished in other ways:

So while I appreciate the suggestions, I'm going to close this issue, at least for now.