Launcher Provider SDK
Launcher Provider SDK is a Launcher feature that enables native applications to get data about the current logged-in user status, store information, configuration, session data, etc.
Overview
Security management for workforce devices is a critical task for IT administrators. Having complete access and visibility to user information and device activity enables the organization to effectively implement security protocols and efficiently control who can view, share, or modify sensitive company data or resources. LauncherProvider is a Launcher feature that allows native applications to get data about the current logged-in user status, store information, configuration, session data, etc.
User Guide
If this feature is enabled in the configuration, the static class LauncherProviderHelper within the LauncherProvider’s AAR library will make provider data readily available and easily accessible.
Ideally, you should be able to retrieve information on specific users, stores, and sessions when the application resumes activity.
The Launcher has an authorizedClients section where customers and organizations can whitelist company-approved applications. The applications defined here are granted access to user information and device activity. Applications not defined here are automatically blacklisted from provider data access.
Feature Configuration
To set up LauncherProvider for a particular device profile or device group, please follow the steps below:
Enabling Provider on Gradle
In this example, the configuration declares the three external libraries that are needed to run the project: launcherProvider, Gson, and Timber.
To access provider data on the AAR library, add launcherProvider-x.x.x.aar to the libs directory of the launcherProvider library.
To access provider data on Gson and Timber libraries, add the following to the dependency list:
Add the Flat Directory to the repositories list in your Project build.gradle file to enable pulling from the libs directory. In this configuration, the online repositories mavenLocal, google, and jcenter host commonly used libraries. It also indicates how to access any additional external libraries that have been manually added to the libs directory.
Enabling Provider on Java
To retrieve information about the current user information, session, and site location, add the LauncherProviderHelper and Session classes in the configuration.
If getProviderInfo is marked as protected within SampleActivity, it indicates that current session information can only be retrieved or accessed from within this class.
Using LauncherProviderHelper and getCurrentSession, you can view the current user's user ID, username, groups, and access token.
If extendedAttributes is added to the configuration section, additional site information such as store number, store name, and device ID can also be retrieved or accessed.
Enabling Provider on Cordova
Install the Cordova plugin to access provider data:
Add contentproviderplugin to the configuration. In this example, contentUri indicates where to locate the data; projection variable indicates which specific data will be retrieved; selection variable is used to filter the data; and, sortOrder indicates how retrieved data should be sorted.
Enabling Provider on React Native
On Android:
Include the AAR for Launcher Provider
Update the Gradle file to include Launcher Provider AAR
Include React Bridge Code
Update Main Application to include React Bridge Code
On React Code:
Include the Launcher Exported Javascript
Whitelisting Applications
You can customize the applications that are permitted to access provider data. Add authorizedClients to the configuration.
Managing Storage and Retrieval of Provider Data
This configuration is responsible for managing provider data, such as storing and retrieving the user’s session data.
The instance LauncherSessionPackage overrides the getPackages method.
The method will get the list of packages that are already being used by the application.
The packages ModuleRegistryAdapter and LauncherSessionPackage will be added to the list.
Once added, the getPackages method will return the updated list to the application.
The application can use the updated list to manage the storage and retrieval of provider data.
Note for Android 11 and Above
For devices running Android 11 or above, add the following lines to the AndroidManifest.XML for any application that requires Launcher Provider access:
Last updated