Initiate a Call or Email from a Screen
You can configure a List and Form screen to initiate a phone call or open an email editor in response to a user action. For example, configure a List screen to initiate a phone call when the user taps on a row of the list where one column of the list contains the phone number. Or, create a Form screen that sends an email when the user presses a Button control. The Button control can reference a Text Field or other screen control that contains the email address.
After initiating the call or the email, the app can return control back to the screen that initiated the call or email. Alternatively, you can configure the app to navigate to a different screen, called the destination screen.
The following figure shows the workflow of an app that initiates a call or email:
In the top image, a screen initiates the call or email. After initiating the call or email, control returns back to the initiating screen. However, because the device's phone app or email app is active for the duration of the call or while composing the email, the user does not usually see the initiating screen again until the call completes or the email is sent. A call ends when the user hangs up or cancels the call or the call fails for any reason. An email ends when the user sends or cancels the email, saves a draft of the email, or the email fails for any reason.
The bottom image shows an alternative workflow. After the call or email is initiated, the app passes control to the destination screen. That means the app navigates to the destination screen during the phone call or while the user composes the email. After the destination screen performs its function, it can then return control back to the initiating screen or to a different screen.
The destination screen can have many uses, including the following:
- Your app could have a "Contact Us" screen with an email button. After the user sends the email, the app can navigate to a "Thank You" destination screen which informs the user about how long it will take for a response.
- After the email completes, the destination screen can log information about the email, such as the email address and send date.
- In an app workflow, initiating the email can be one step in a multistep workflow. After sending the email, your app can then automatically navigate the user to a destination screen containing the next step in the workflow.
- The destination screen is available during a phone call. In a CRM application, it might be useful while on the phone with a contact to know the past history of that contact. Therefore, the destination screen could contain a contact history screen so that the user can access it during the phone call.
One advantage to creating a destination screen is that the app can prepopulate the destination screen with data about the call or email, such as the email address, phone number, or other information. The destination screen can also let the user enter additional information, such as a note or comment. Prepopulating the destination screen is useful in a multistep workflow or when logging information about the call or email.
All platforms support navigating to a destination screen after a call or email and passing information to the destination screen. BlackBerry devices provide functionality that lets you obtain additional information about the call or email not available on Android or iOS devices. For example, you can capture the email body on BlackBerry devices only.
You define two types of destination screens:
- A Form or Add screen where the user decides the action to take after the call or email.
- An action-only Form or Add screen to automatically perform an action without user interaction. The users does not see the action-only screen. An action-only screen perform its specified action, and then immediately returns control to another screen.
This document contains the the following topics: