In Dropsource you will use Events and Actions to define how your app will behave. You can respond to different types of Event that occur while your app is running:
For each task you want your app to perform, decide when it should happen, then select the relevant app component and add an Action to one of its Events. Dropsource provides Actions for many different types of app behavior.
You can detect user interaction with most of the Elements in your pages, including page config components such as Nav Bars and App Bars. To respond to the user interacting with an Element, select it on the Canvas or in the Element Tree and open Properties > Events.
You will see a list of Events your app can detect for your chosen Element. The available Events reflect the ways in which users interact with mobile devices / touchscreens, for example tapping.
Click Add for an Event and add one or more Actions to execute. Once you have Actions added to an Event, the button will display Manage, so you can see at a glance which Events have Actions running when they occur.
Adding Essential Functionality
Each use case is unique, but certain types of functionality are common to most app projects, such as:
Two Actions are provided for page navigation: Go To Page, and Go Back. In the Go To Page Action, select a page, a transition, and any Page Variables required by the page you are navigating to.
You can achieve standard back navigation in any page with a Navigation Bar on iOS, by checking Enable Back Button in the Properties tab. When you use this standard setting, the Action navigating to the page should use push transition.
If you’re using a Page Controller or View Pager, in addition to the standard swipe navigation, you can use a range of Actions to present particular Views as your app runs.
If you want to present a specific page when the user launches the app, add the Change Landing Page Action to the Application Launched Lifecycle Event.
Dropsource provides a range of Elements for capturing user input. You can access this user input in Actions and API requests, via the Elements container.
The Set Value Action allows you to update many Element properties dynamically while your app is running, for example altering display by toggling visibility.
If a Set Value action assigns an invalid value to an Element property (for example setting a number outside the valid date range in a Date Picker), the app will ignore the assigned value.
In the Lifecycle tab on the left of the editor, you can carry out functionality on Events that happen at various stages of your app lifecycle. For example, you could carry out setup or onboarding tasks for the app the first time the user runs it.
These Events are useful for initializing user preferences and responding to other app-level Events such as notification registering.
Certain Actions are not supported within App Lifecycle Events, for example Go To Page, which can only execute in the context of a page or Element Event.
Your app can execute tasks when a page loads, appears (for example when the user has put the app in the background then returns), or is left. Anything you want to happen as soon as the user sees a page should be added to the Loaded or Appeared Events on iOS / Create, Start, or Resume Events on Android, for example running an API request that doesn’t require any further user input.
Android apps can respond to additional page lifecycle Events – Create, Start, Resume, Pause, Stop, and Destroy. See the Android Developer guidance for more detail on when these Events will fire.
To carry out processing when a page Event happens, select the page on the Canvas or in the Element Tree. Open Properties > Events to add Actions.
Each status code and dynamic Element associated with an API request has an Event that your app can respond to. Check out Handle API Events for more info.
Using Actions Effectively
You can build and combine Actions to create control flows that achieve the custom functionality you need.