A day in a life dealing with your mobile app features

5 min read

By: Vittal Pai and Chethan Kumar N Settipalli

A day in a life dealing with your mobile app features

 

App Launch on IBM Cloud is a service that helps you control your application features. Lets familiarize with the concepts to best exploit the capabilities of App Launch. You will learn the building blocks of the service and how each feature in the service will help you with your mobile app feature release.

Let’s say you would like to add a button to your app that pop’s up a poll question with yes-no options. You want to be able to control when it shows up, who gets to see it, how it appears for different user segments and of course measure the outcomes. In the App Launch service console, you will configure this button’s attributes and later in your app, you will use the SDK APIs.

Concepts Overview

Feature A feature denotes a distinctive capability or characteristics of an application. It can be thought of as  a Java class where you define class members. We wanted to add a button which would pop up a Poll. Let’s call this feature “Ask Poll”. Define properties in this feature as below

-" property 1 -" “popUpText”

-" property 2 -" “popUpYes”

-" property 3 -" “popUpNo”

Metrics App Launch Service allows extensive support to embed metric collection hooks for features. These metrics will help you evaluate results of A/B testing, Feature performance, etc. For example, in the above feature, we could measure how many positive and negative responses were collected. We could add a couple of metrics for that – “Positive Response” and “Negative Response”. Once, coded in the app, you can see the response in the engagements.

Audience An audience is a collection of attributes that define the characteristics of an audience segment. Let’s say you’d like to group all ‘Registered’ users, then you will define an Audience, called “RegisteredUsers” with an attribute in it, called ‘UserType’ with a value set to ‘Registered’. Later during the app development you will initialize your app by setting an attribute with {‘UserType’:’Registered’}. This initialization will cluster that app (the device) into a ‘Registered’ audience.

-" Let’s define an audience called, “AllUsers”

-" Set its value to “Registered,Guest” (registered and guest users)

Engagement Engagement represents rolling out the feature in question to the selected audience segment at a specific time.An engagement can be thought of as an instantiation of a feature with properties initialized and attaching one of the pre-defined audiences. For our “Ask Poll”feature, we will,

-" Create an Engagement, called -" “Ask Poll Engagement”

-" Initialize AskPoll feature with,

-" popUpText = “Feeling good?”

-" popUpYes = “Absolutely”

-" popUpNo = “Nah”

-" Initialize Audience,

-" Audience=”AllUsers”

Once the above is defined in the Console, in your code you will initialize the service and call the registration API passing in,

“`
{‘UserType’:’Registered’}
“`

The app can now be coded to utilize these feature parameters to set the Poll question and the two button’s label. That’s it – the app will load the feature parameters during app initialization. If the text is updated then the updated text is fetched during the next app initialization.

Remote Feature Toggle

This is one of the most often asked feature and the easiest to accomplish using the App Launch Service. This allows you to on-the-fly turn off a feature so your users don’t see it. You also have the ability to instantly turn it back on if you wish.

To turn off the ‘Ask Poll’ feature we defined earlier, In the App Launch Service Console if the engagement, “Ask Poll Engagement” is paused then the logic to check for the feature fails and the button”Take Poll” will never be displayed. Resume it, then the button is displayed.

In your code surround the app logic to check if a feature is defined. For example, to display the ‘Take Poll’ button surround the display logic with a check for the feature, called “Ask Poll”.

Test Feature Variants

Often Developers would want to create multiple variants of Feature properties and apply them to a different percentage of users to test which variant is better. For example, in the Poll example, fifty percentage of users should see one variation of the poll question and the remaining fifty should see variation of the same question. The idea is to perform an A/B test on users to arrive at the more suitable question. Again, there is no change need to be done to the feature. You will need to create a new Engagement which allows you to create multiple Feature instances (variations) by setting a percentage for each instance. For example,

-" Variant 1 (50%)

-" popUpText -" “Is the new feature making a difference?”

-" popUpYes  -" “Yes”

-" popUpNo -" “No”

-" Variant 2 (50%)

-" popUpText -" “How do you like the new feature?”

-" popUpYes  -" “Great”

-" popUpNo -" “Not Really” The great thing about App Launch is that no change in the code since the App Launch Service handles the audience segmentation. Which also means that no need to go through the App stores to test out the feature.

App Theme Customization

App Launch allows you to customize the App theme. You can easily make App UI changes and restore back if undesired.

We will define a feature called theme which has background color and poll button color as properties. Lets create an engagement called “ThemeEngagement” to roll these properties to “AllUsers”. When the engagement becomes active, you can notice that the background color and button color has changed. Simply pause the engagement and you will see the original theme reappear. This is how easy it is to change themes with App Launch

In-App Messaging

Another neat functionality is App Launch Service is to send messages to your users within the app. You could use it to describe a new feature that is rolled out or may be even ask users for feedback. For example, if you would like to ask user if they liked the Poll feature that you rolled out earlier.Or you could send an announcement about new features.

For this, you will need to create a new engagement “Announcement” and you can craft the in-app Message content. You then can target it to a segment to users – “GuestUsers” You can also configure when the In-App message should be shown- lets say- “Every launch”

Now, everytime a user opens the App, he will see an In-App message he will see the announcement. All of this without any new code or trips to the App stores.

Refer to more samples at App Launch Samples Repository

Refer to App Launch Documentation  for further details

Be the first to hear about news, product updates, and innovation from IBM Cloud