open
Description
To open any file with a the available local external mobile application available.
Input / Parameter
file
The full file path of the file to be opened.
Text
-
-
Yes
extra
Passed value so that it can be access by extra type value.
Any
-
-
No
Output
N/A
Callback
callback
The action performed if this function runs successfully.
Successful text massage
Text
errorCallback
The action performed if this function does not run successfully.
Returns an error message.
Text
Example
In this example, we will open a file that we chose from a file explorer app using a fileChooser
function.
Steps
Drag a button component to a page in the mobile designer, select the component and on the event
press
drag thefileChooser
function to the event flow.Inside the
fileChooser
functionyes
callback add theopen
function and fill in the parameter withinput
as the param type forfile
.
Result
Open the installed app on a device and press the button, it should open up the file explorer app so we can choose from there.
If the file and the suitable apps for opening that file exists, user should be able to see the popup where they can choose which app that they want to use for opening the file. Note: If there's only one app in the user device that's suitable for opening the file or the user had chosen a default app for opening that file type, it will automatically open that app without showing the app chooser popup.
Check the file content using previously selected suitable app.
Links
Related Information
See also:
Functions
Last updated