Create a Custom Activity for a Mobile Application

Create a custom activity for a monitored mobile app to collect performance data when a user performs a business activity in the app. For example, if you have a monitored mobile app that has a search function, and you want to measure how long the search takes, create a custom activity for the search. The performance data is displayed on Aternity dashboards.

Every monitored mobile app has a dormant recording function that you can enable to record a user performing the activity. You use this recording, which is a log of events, to create the activity.

Important

Aternity ensures your privacy by notifying the user of the mobile device each time you start or stop recording.

An Administrator of Aternity remotely starts recording the events of a monitored mobile app, then the end user performs the activity. A user must give express permission to start each recording. After the activity, the administrator remotely extracts the event log of the recording, and then a signature developer uses Aternity Activity Designer to locate the start and end events of the activity. Finally exports the signature file to upload it to Aternity.

Aternity Activity Designer is a visual tool for creating custom activities for desktop and mobile applications without requiring any programming knowledge. Designer enables you to pinpoint the UI events that mark the start and end of your new activity.

Workflow for creating custom activities for monitored mobile apps

Record the same activity several times, so that you can look for recurring patterns of events in the logs. These patterns can help you spot the start and end events of the activity.

For many monitored mobile apps, you will be able to find the start and end UI events that you need to define the custom activity. If that is not the case, ask the app developer to to clearly tag the start and end events in Android (learn more) or iOS (learn more), and then record the business activity.

Before you begin

  • The application must be a monitored mobile app. Learn more.

  • You must add the monitored mobile app as a managed application.

  • You must have access to a mobile device running the monitored mobile app.

  • Before creating activities, interview application users, novices and power users to determine the application's critical transactions which you want to measure (learn more).

  • Contact Aternity SaaS Administration to enable the Agents screen.

Procedure

  1. Step 1 Ask the app user to open the monitored mobile application on a mobile device.

    In this example, we report an error in an Aternity training application on an iOS device.

  2. Step 2 As an Administrator of Aternity, enable the recording function in the application to begin recording an activity.
    1. a In Aternity, select the Gear Icon > Agents and select the mobile device on which you want to record the activity.
      Select the device on which you want to record the activity
    2. b Select Change Log Level > Recording to being recording.
      Start recording the application on the mobile device

    A notice appears on the device telling the user that recording has begun.

    You can record up to one hour or 10MB of data, whichever occurs first. If you close and reopen the application during recording, the recorder starts a new log, overwriting the previous one. We recommend that you create a short recording of a single activity, collect the log, close and open the application, and record another activity, and so on.

    Note

    The application communicates with Aternity at one-minute intervals, so there may be a delay before the notice appears and recording begins.

    Start recording the activity in the mobile application
  3. Step 3 Ask the app user to perform the activity in the application.

    In our example, the user clicks the Post an error button to submit an error report, and then sees a confirmation message.

    Click the Post an error button to start the activity
  4. Step 4 Stop the recording.

    As an Administrator of Aternity, in Aternity, select the Gear Icon > Agents and select the mobile device on which you recorded the activity. Select Change log level > Default to stop the recording.

    Aternity notifies the user that the recording ended
  5. Step 5 As an Administrator of Aternity, on the Agents screen, select Collect Logs to move the recorded logs from the device to Aternity, and then select a log from the list of Available Logs to download it.

    Your computer saves the logs in the Downloads folder of the computer from which you access the Agents screen. After you download the logs, transfer them to the signature developer.

    Collect and download Aternity mobile logs
  6. Step 6 Download and extract the latest version of Designer from the Riverbed Support Site.
  7. Step 7 Open Designer by double-clicking <extracted folder>\Aternity Designer <version>\Activity Designer.
    Launch Aternity Activity Designer
  8. Step 8 Add a new application by right-clicking My Library and selecting New Application.

    Enter a unique name for the application, for example, Aternity Training.

    Add a mobile app to the Designer
  9. Step 9 Load the mobile transaction logs that you downloaded by right-clicking the application and selecting Load Recording.

    The recording includes logs, but no video of the activity.

    Load the recorded log of events
  10. Step 10 Search for a start event for the activity.

    You can use the Search events for... field to limit the number of events that the Designer lists. For example, if you want to see only events that include an alert, search for alert.

    Tip

    If you recorded the same activity several times, you can look for recurring patterns of events in the logs. These patterns can help you spot the start and end events of the activity.

    For many monitored mobile apps, you will be able to find the start and end UI events that you need to define the custom activity. If that is not the case, ask the app developer to to clearly tag the start and end events in Android (learn more) or iOS (learn more), and then record the business activity.

    Locate the start event
    UI Action iOS Event Android Event

    User taps a UI element.

    This is the start event in the example of reporting an error in the Aternity training application.

    getTouchUpInsideActions

    OnClick

    User selects a tab.

    getUIControlEventValueChanged

    setSelected:animated

    tabBar:didSelectItem

    OnTabSelected

    OnItemClick

    User selects one of the UI elements.

    setSelected:animated

    OnItemClick

    User selects a row in a table.

    tableView:didSelectRowAtIndexPath

    OnItemClick

    The app starts a process without a change in the UI, such as beginning to communicate with a web site.

    DoInBackgroundStart

    User selects an item in a list.

    OnListItemClick

    A specific screen (activity) has become active again, for example, if the user clicks Back to return to a previous screen.

    onActivityResumed

    The specific screen (activity) becomes inactive, for example, if the user moves the app to the background.

    onActivityStopped

  11. Step 11 Add the start event to the activity by right-clicking the event you identified as the start of the activity, and selecting Use Event as Start > New Activity.
    Add the start event to the new activity

    Provide a meaningful name for the activity.

    Create a new activity in Designer
  12. Step 12 Find the complete event in the recording, right-click it, and select Use Event as Complete > <ActivityName> to add it to the activity.

    In the example of reporting an error, the end of the activity is when the application displays a confirmation message that an error was logged.

    This displays on the device as error added and in the log as 1 error(s) added to the system log.

    Add the event that marks the end of the activity
    UI Effect iOS Event Android Event

    Changes needed in the screen display have been completed.

    viewDidAppear

    The app displayed text on the screen.

    SetText

    SetText

    Toast (in popup)

    The user moved another app into the foreground.

    SwitchToBackground

    A web page has finished loading in the app's web view.

    webViewDidFinishLoad

    WebViewOnPageFinished

  13. Step 13 Generate the signature by right-clicking the activity and selecting Generate Signature (keyboard shortcut Alt+G).
    Generate the signature

    You can also generate signatures for all of the valid activities in an application by right=click the application and selecting Generate Signatures for All Valid Activities (keyboard shortcut Alt+Ctrl+G).

    Provide account details, which the Designer uses to customize the documentation for each signature you generate, and the directory in which you want to save the signature, <signature>.xml and the signature documentation, <signature>.html.

  14. Step 14 After you generate the signature, provide it to an Administrator of Aternity so that they can upload your custom activity to Aternity. Learn more.

    When you upload a custom mobile activity, it is automatically assigned to the app on all mobile devices.

  15. Step 15 Monitor the application on Aternity dashboards to ensure that it is reporting the activities as expected.