QSL4A Documentation of
openFile <QSL4A API Menu>openFile(path, type=None, wait=True)
Open the file in the default open mode with content:// .
path (String) file path
type (String Optional) MIME-type self-defined
wait (Boolean Optional) wait for the end of the file open operation
==== Example of openFile =====
from androidhelper import Android
droid = Android()
droid.openFile('/sdcard/test.apk') #Install package
droid.openFile('/sdcard/path to/package.7z','application/x-7z-compressed') #Open as a compressed file (You can search for a MIME type with an extension (such as 7z) on the internet by yourself)
droid.openFile('/sdcard/DCIM/image.jpg',wait=False) #QPython does not wait for the completion of the file opening operation and proceeds directly to the next step
droid.openFile('/sdcard/python/code.py','text/plain',False) #Open plain text file without waiting for the file opening operation to end