1. Home
  2. WalkMe Mobile
  3. Mobile: Analytics and AI
  4. Mobile: Additional Mobile APIs
  5. Mobile: What Is The Restart WalkMe API and How Is It Used?

Mobile: What Is The Restart WalkMe API and How Is It Used?

Updated on November 14, 2018
Download PDF

Brief Overview

Supported from SDK version 1.13.0, the Restart WalkMe API lets app developers better tailor WalkMe to their needs and control the timing WalkMe’s session and content sync.

The default WalkMe Mobile SDK behavior for sessions and content sync is as follows:

  • The SDK syncs Campaigns and Rule Based Goal content whenever the app process is started (as long as there is internet connectivity; otherwise offline mode kicks in).
  • A new WalkMe session is started every time the end user starts the app, whether or not it was already open in the background.

This default behavior will suffice for most apps, but there are some apps with unique use cases that need more control over sessions or syncs. For example:

  • Apps that are constantly in the foreground (such as point-of-sale apps) will need to proactively let WalkMe know what to consider as a new session.
  • Apps that keep their processes alive while the app is in the background for hours or days may want to proactively sync content to make sure users have the most up-to-date content (instead of counting on end-users to manually kill the processes for WalkMe to sync).

The Restart WalkMe API will perform a content sync and new session initialization whenever called, but we recommend adding it where it makes the most sense from end-user-usage perspective, and according to the use case. Examples include when the app moves to the foreground, when a user logs in, or when a definitive process such as a sales process is completed.

Steps For Implementing the Restart WalkMe API

The Restart WalkMe API can be called using the following API:

Android

/**
 * Restarts WalkMe session and syncs content.
 *
 * This method can only be called after {@link #start(String, String, Application)} was already called.
 * Restarting the session is allowed if old session is at least 1 minute old.
 */

public static void restart()

iOS

/**
 * Restarts WalkMe session and syncs content.
 *
 * This method can only be called after {@link #start(String, String, Application)} was already called.
 * Restarting the session is allowed if old session is at least 1 minute old.
 */
 
+ (void)restart;

Was this article helpful?

Related Articles