Question

I'm currently writing a mobile app (hopefully iOS or android) using the jquery mobile framework and phonegap. It'll need to export/send csv files in some way to the users, but I'd be interested to hear ideas or suggestions about the best way of doing so. If this can be done on the js side of the app that'd be ideal as it's what I'm most familiar with. A couple of options I've considered are:

  • Uploading the file using the google docs api
  • Writing the file to the file system (then export e.g. via iTunes)

I'm new to this so any suggestions gratefully received! Thanks for your help

Was it helpful?

Solution

There are a few options that you could use depending on how you want it to work.

The main options would be to

  1. Use the File API (http://docs.phonegap.com/phonegap_file_file.md.html#File) to store files on the filesystem of the device.
  2. Upload the file to a server using a standard XMLHttpRequest.
  3. Write a native PhoneGap plugin on each platform that you are interested in that could connect to Google docs.

OTHER TIPS

As Dave pointed out you can write files with the FILE API. I have used the file api on iOs to write custom log files and havent found any yikes so far.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top