Table of Contents

OpenFile

(Information and examples taken from the DroidScript documentation)

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

You can also pass null for the second parameter and the type will be automatically determined from the filename.

 app.OpenFile( fileName, type, prompt );

function OnStart()
{
   app.WriteFile( "/sdcard/test.txt", "Hello" );
   app.OpenFile( "/sdcard/test.txt", "text/plain", "Choose Editor" );
}  

CheckBoxes

function OnStart()
{
  app.OpenFile( "/sdcard/Download/doc.pdf", "application/pdf", "Open With..." );
}