Harry
Harry

Reputation: 13

Exporting files from a Javascript based phonegap app - options or ideas?

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:

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

Upvotes: 1

Views: 2260

Answers (2)

Daniel Kurka
Daniel Kurka

Reputation: 7985

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.

Upvotes: 1

davejohnson
davejohnson

Reputation: 1447

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.

Upvotes: 2

Related Questions