User Tools

Site Tools


built_in:open_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
built_in:open_file [2015/03/04 18:15]
octazid created
built_in:open_file [2018/04/17 01:20] (current)
Line 5: Line 5:
 ====Description==== ====Description====
  
-The **OpenFile** method allows you to open a file with an external application on your device. The user will be prompted you to choose an appropriate App to handle the specified file type.+The **OpenFile** method allows you to open a file with an external application on your device. The user will be prompted you to choose an appropriate App to handle the specified file type 
 + 
 +You can also pass null for the second parameter and the type will be automatically determined from the filename.
  
 <code> app.OpenFile( fileName, type, prompt );</code> <code> app.OpenFile( fileName, type, prompt );</code>
Line 11: Line 13:
 ---- ----
  
-====Example====+  *   * Unordered List Item====Examples====
  
 <code javascript> <code javascript>
Line 20: Line 22:
    app.OpenFile( "/sdcard/test.txt", "text/plain", "Choose Editor" );    app.OpenFile( "/sdcard/test.txt", "text/plain", "Choose Editor" );
 }   }  
 +</code>
 +[[built_in:checkboxes|CheckBoxes]]
 +<code javascript>
 +
 +function OnStart()
 +{
 +  app.OpenFile( "/sdcard/Download/doc.pdf", "application/pdf", "Open With..." );
 +}
 +
  
 </code> </code>
built_in/open_file.1425492933.txt.gz · Last modified: 2015/03/05 02:15 (external edit)