I'm wondering whether there is a best practice (or a prefered way) to export data generated in an Android application to a desktop PC!?
The scenario is the following: my Android application collects sensor data, which I want to export (e.g., as a CSV file) for later analysis on a desktop PC (let's assume it's running Windows). Once the data is exported, I don't care about it anymore; In particular I do not want to import it again. The only constraint is that a normal PC user (without indepth knowledge about Android's file system, cloud storage, etc.) should be able to perform this task.
It seems to me that this is a common task, and I'm looking for a simple way (from a user perspective) to achieve it. If possible, the solution should not require to implement my own cloud service or desktop client. Please note that I'm not asking for technical details, but for a general method to solve my problem.
A few straight-forward solutions come to my mind, but I'm not sure about the pros and cons.
An ideal way seems to be something as described here: How do I export text from iOS application to desktop PC? Unfortunately, it's Apple ...
You already gave good suggestions. I would be inclined to have a "Share with" button as other apps already have, and have several choices depending on the installed apps on the device. In particular have one of the choices to save the file to the sdcard, so that the user can copy it to the PC with a USB cable, and other choices to send by mail, share with Dropbox (if available) etc.

The above can be accomplished by using an intent with action ACTION_SEND, and Android will take care of displaying the available options. For the "copy to sdcard" choice, maybe you can write an activity that is part of your application that also listens for the ACTION_SEND action, and if selected just copies the files to the sdcard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With