2

I am an extremely newbie in working in cordova/phonegap app development and would like to implement a function to read in the command line arguements supplied to cordova

For an example if I write the following code:

cordova build android insong.wmv

How do I get the android java to read in the command line arguements?

I searched on stackoverflow, but to no avail:

https://stackoverflow.com/search?q=cordova+command+line+arguements

https://stackoverflow.com/search?q=cordova+arguements

Community
  • 1
  • 1
Dref D
  • 257
  • 2
  • 17
  • What are you trying to do with the argument you are passing in? – Andrew Lively Mar 26 '14 at 14:46
  • Hi, I am trying to open the file , stored in /mnt/sdcard and determine its type and then execute it, for example , a .mp3 file , will be played as a song, a .pdf file will open as Acrobat Document and so on. – Dref D Mar 26 '14 at 16:20
  • You should use the [File API](https://github.com/apache/cordova-plugin-file/blob/dev/doc/index.md) for this instead if the file will be stored on the device. With the File API you can navigate the file system, determine file type, and go from there with whatever you need to do. – Andrew Lively Mar 26 '14 at 16:41

0 Answers0