The
execsystem function, on mobile devices (Android), starts another application or executes a task. There is a related version for applications running on
desktop CSEntry.
If
stop is coded, the application will immediately close after launching the application, in the same way that would occur if using the
stop function with an argument of 1.
The string expression action must begin with one of the following commands:
Command | Description |
app | Open another application on the device. (You can get more control using SystemApp instead.) |
browse | View a website in the Internet browser. |
call | Place a phone call. |
camera | Take a photo in .jpg or .png format. |
gps | View a latitude/longitude point using an installed mapping engine (e.g., Google Maps). |
html | View a website from within CSEntry (equivalent to using the view function). |
signature | Bring up a screen where someone can sign the mobile device, an image of which can be saved in .jpg or .png format. |
sms | Send a text message. |
view | Display an image, play a sound clip, or view a movie (equivalent to using the view function). |
The function returns a logical value of 1 (true) if the new application or task is started successfully and 0 (false) otherwise.
execsystem("app:com.google.android.gm"); // open Gmail
execsystem("browse:https://www.census.gov");
execsystem("call:+13017631451"); // call the CSPro support number
execsystem("camera:" + pathconcat(Application, "photo.jpg"));
execsystem("camera:" + pathconcat(Application, "photo.png"));
execsystem("gps:38.84839,-76.931098");
execsystem("gps:38.84839,-76.931098,CSPro Team at the U.S. Census Bureau");
execsystem("html:https://www.census.gov");
execsystem("html:file:///" + pathconcat(Application, "local_webpage.html"));
execsystem("signature:" + pathconcat(Application, "saved-signature.jpg"));
execsystem("signature:" + pathconcat(Application, "saved-signature.png"));
execsystem("sms:+13017631451");
execsystem("sms:+13017631451,Hello, CSPro Team!");
execsystem("view:" + pathconcat(Application, "picture.jpg"));
execsystem("view:" + pathconcat(Application, "audio.mp3"));
execsystem("view:" + pathconcat(Application, "movie.3gp"));