Welcome to the WalkMe Help Center

Please login in order to continue:

Work flows better with WalkMe
Work flows better with WalkMe.

Mobile Screen ID API

Last Updated July 20, 2022

Brief Overview

The WalkMe Mobile SDK can use a screen as a variable available for Segmentation and Rule Based Goals. The SDK also uses screens as part of the context in which an element is captured, in order to be able to identify it later.

Starting from SDK version 1.18.0, you can use the setScreenID API to set the most accurate context for WalkMe based on your app's behavior and use cases.

It's important to note that if the API is used to identify a screen, WalkMe will not attempt to identify screens by the regular algorithm as they change, so it is the developer's responsibility to make sure the screen ID is set properly and reset when screen changes. If a screen ID is not reset, WalkMe will continue using the last screen ID set throughout the app, which may cause disruptions in WalkMe's behavior.

For that reason, it is advised to use the setScreenID API only when a unique need for it is identified, and with great attention.

How to Implement the Screen ID API

Android Apps

To set a screen ID, call the setScreenId API with a unique ID in onResume() , and call it again with a null value in onPause() .

/**
*  Set ID for a specific screen.
*  When used, this should be called every time the screen shows
*
*   @param screenID the ID to set for a specific screen
*
**/

public static void setScreenID(String screenID)

iOS Apps

To set a screen ID, call the setScreenId API with a unique id in viewWillAppear , and call it again with a nil value in viewWillDisappear to reset the value as the screen changes.

/**
* Set ID for a specific screen.
*/
+ (void)setScreenID:(NSString *)screenID;

iOS Usage Examples:

[ABBI setScreenID:@"my_unique_screen_id"];
ABBI.setScreenID("my_unique_screen_id")

Was this article helpful?

Thanks for your feedback!

Be part of something bigger.

Engage with peers, ask questions, share ideas

Ask the Community
×