Adding App Navigation through Actions and Triggers

Through Miracle Mobile Platform, app navigation is the result of an activity such as pressing a button (Action), which in turn leads to one or more responses (Trigger).

An Action is any activity in a mobile app that causes a trigger or multiple triggers to launch. For instance, a control with the action Button Click can be customized to result in submitting a form, navigating to a page, or saving a contact.

MiracleStudio allows users to add and configure the following actions.

  • Button Click – This option allows you to configure a button, image or label to dispatch an event whenever a user taps on it.
  • Listcell Click – This option is for configuring the Segmented Selector control. It can be used to launch triggers when an item is selected or to update the ‘Selected Item’ context of the data.
  • Page Load – This action occurs when a page is loaded (i.e. shown on the device’s screen). Triggers for data bindings and population of fields should be configured accordingly.
  • Picker Select –
  • List Select –
  • Notification Click – This action is exclusive for notification items. It can be configured from the Notifications configuration panel to create different triggers for when a notification is clicked or tapped.

To configure an action, use the following steps.

  1. In MiracleStudio’s Open Page Designer, open the page containing the controls you want to add actions to.
  2. Click the control you wish to configure. On the right panel, click Actions/Triggers followed by ‘+ Action’. Choose the best action for your control from the drop down menu and click ‘Save’.
  3. To define the action’s responses, configure triggers.

Triggers are associated with actions. They are the resulting response of when an action occurs. In most cases, you will be defining multiple triggers for a single action. These will come together to form the flow of the application and allow easier navigation.

You can use and configure the following types of triggers through MiracleStudio.

  • CallNumber – This trigger will access the default phone application on the user’s device and display the configured number on the dialer. Click the Data tab to specify the number.
  • Close – Pressing the Back button on the device closes the current page by default. However, you can configure this trigger and call it after another trigger such as Save Draft or Submit Data. That way, the user will be navigated automatically to the previous page once they perform the desired action.
  • DownloadService – This trigger is used to evoke a download service and download files from it. In the Data tab, you can configure the extension of the file to be downloaded onto the user’s device.
  • GetData – The trigger can be configured to retrieve data from MiracleTek’s servers or from a configured connector.
  • NavigatePage – This is another trigger used for configuring navigation. When configured, it will simply allow the navigation from one page to the other.
  • OpenApp – The purpose of this trigger is to launch a specified application. Android and Windows Phone users will be prompted to choose the best application for the activity specified if no default application had been set.
  • OpenNotificationPage – This trigger will open the Notifications Page so that users can view, read or delete all the notifications they received.
  • SaveContact – Through this trigger, you can save the configured information as a contact in the device’s default phone address book utility. In the Data tab, you can define the Name, Last Name, Email, Work Number, and Mobile Number of the contact to be added.
  • SaveDraft – One of the advanced features offered by Miracle Mobile Platform, this trigger allows users to save the data they input in the fields of a form or page as a draft. From the drafts section in the Category page, users can view the full form or page with the data they had entered earlier.
  • SendEmail – The trigger will launch the device’s default email application and place the configured recipient’s email address in the ‘To’ field. Click on the Data tab to specify the email address the data will be sent to.
  • ShowCategory – The purpose of this trigger is purely navigational as it takes the user back to the Home Screen (Category Page).
  • SubmitData – This is a data submission trigger. It will post the data from a page or form to the configured connector, which can either be a database connector or a service connector.
  • SubmitLater – This trigger works similarly to SubmitData. However, instead of submitting data immediately, it places it in a queue that is processed every 15 minutes. Even if the user’s device has no network coverage, the queue will continue trying to post the data. Once the device is connected, the data will be posted unless it has been removed from the queue.
  • SubmitLogin – This trigger is a special type of SubmitData which utilizes authentication connectors to authenticate users logging into the app.
  • TextNumber – The purpose of this trigger is to launch the default messaging application on the user’s device with the configured recipient’s number. Click the Data tab to specify the number which users will be texting when this trigger is evoked.
  • UploadService – The trigger is used to call an upload service that allows files and other data to be uploaded.

At times, sub-triggers may be required. For instance, if you require sending the data collected via a form to be emailed to you in a PDF file, you will need to first set a SubmitData trigger followed by an EmailPDF trigger. MiracleStudio offer five sub-triggers for you to choose from: CallService, EmailPDF, SendEmail, SubmitData, and UploadService. Three of these have already been defined above, so here are the definitions of the remaining two.

  • CallService – This trigger is configured to call a web service from the mobile app.
  • EmailPDF – Another advanced trigger, it converts the controls on a page or form into a PDF file that is then emailed to a configured email address or multiple recipients. In the Data tab, you can include a name for the attachment (add .pdf extension as well), specify a logo for the file, add a subject, body and recipient email address, and even include addresses in CC and BCC fields.

To configure a trigger, here are the steps you should follow.

  1. In order to add a trigger, you need to first add an action. In MiracleStudio’s Open Page Designer, open the page containing the controls you want to add actions to.
  2. Click the control you wish to configure. On the right panel, click Actions/Triggers followed by ‘+ Action’. Choose the best action for your control from the drop down menu and click ‘Save’.
  3. Hover over the action you created and click on the ‘+’ button to add a trigger. Select the type of trigger that complements your action and define its data if necessary. If your action entails storing data or authenticating it, fill in the Connector, Entity, and Service fields. Finally, click ‘Save’.
  4. To add a sub-trigger, hover over your new trigger, and click the ‘+’ button. Specify the type of the trigger and other details before hitting ‘Save’.