Back

OpenFile

JS Py
Hello World

Allows the user to open a file with an external application on the device.

app.OpenFile( file, type?, choose? )

The choose parameter shows the user a custom message in the choose dialog.

See also: SendFile.

Example - Example

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

def OnStart():
    app.WriteFile("/sdcard/test.txt", "Hello")
    app.OpenFile("/sdcard/test.txt", "text/plain", "Choose Editor")
    Copy     Copy All       Run      
String
String: mimetype
String: path to file ( “/absolute/...” or “relative/...” )