Preferred Activities

This configuration manages which app should be used as default for a specific operation.

The Preferred Activities configuration assigns a specific app to Android operations (intents). Each entry consists of an app and, optionally, an activity, categories and actions; Android then permanently uses this app for matching operations. In the portal, the configuration is not labelled with a specific enrollment mode. It can be added only once per policy.

The configuration does not install the selected app. Installation is handled separately, e.g. via Manage apps →. A complete use case – the Relution Homescreen as default launcher – is described in the article Homescreen as default launcher →. For typical default apps such as browser or phone, the Default Applications → configuration offers a dedicated selection.

Google advises against defining both a preferred activity and a default application for the same purpose, such as the browser, as the device may then behave unpredictably. For kiosk operation, Google provides a dedicated kiosk mechanism instead of preferred activities; in Relution, the Kiosk Mode → configuration is available for this purpose.


List of apps

The configuration shows a list with the columns Name, Bundle identifier, Activity, Actions and Categories. The Actions and Categories columns only show the last part of each name (e.g. HOME for android.intent.category.HOME). Long values are truncated; a tooltip shows the full content of a cell when the mouse pointer rests on it.

A new entry is created via Add. The context menu of an entry offers Edit and Delete; several selected entries are deleted via the context menu of the list. Each app can only appear once in the list: apps already listed are excluded from the selection in the Relution App Store, and if an app already listed is added again by another route, the new entry replaces the previous one. Changes to the list are only applied to the policy version with Save. In a policy version that has already been published, the list is read-only: Add and Delete are disabled and state the reason “The policy is already published” in their tooltip; the context menu of the entries and Save are not displayed.


Selecting the app

The Activity dialog creates an entry in three steps. In the first step, the source of the app is selected:

  • Relution App Store app – An app is selected from the Relution App Store. Native and public apps for Android and Android Enterprise are offered.
  • Managed Google Play Store App (Android Enterprise) – A free app is searched for in the managed Google Play Store via Android Enterprise. This source is only available if Android Enterprise is set up for the organization.
  • Manually add app – The name and bundle identifier of an app are entered manually. The fields Name and Internal name are mandatory; the package name is entered as internal name (example in the portal: com.mwaysolutions.relution).

Relution App Store app is preselected. In the second step, the app is selected or the details of the manual app are entered. Exactly one app is selected from the Relution App Store; after an app has been selected in the managed Google Play Store, the dialog automatically moves on to the third step. In the second step, Next only becomes active once an app has been selected or Name and Internal name have been filled in.


Activity, categories and actions

In the third step, the details of the entry are defined. When an entry is edited later via Edit, only these fields are shown; the app itself remains unchanged.

  • Activity – optional class name of the activity within the app, e.g. io.relution.homescreen.MainActivity. If the field is filled, Relution transmits package name/activity as the target; if it is empty, only the package name is transmitted. In that case, Android Device Policy chooses a suitable activity of the app. The package name and slash are not entered in the field; besides the full class name, the short form with a leading dot is also possible, e.g. .MainActivity.
  • Categories – list of intent categories, e.g. android.intent.category.HOME. The input suggests the standard Android categories; custom values are possible. An intent only matches if all of its categories are contained in the list; a category in the list only has an effect if the intent specifies it.
  • Actions – list of intent actions, e.g. android.intent.action.MAIN. The standard Android actions are suggested here as well. If the list contains actions, the action of an intent must be one of them; if it is empty, the action is ignored for matching.

Categories and actions are not mandatory. A hint in the dialog refers to the Google documentation → for details on the standard categories and actions.

In the Categories and Actions fields, a value is added with the Enter key, via the plus icon or when leaving the field and then appears as a chip below the field; several values separated by spaces are added in one step, duplicate entries are ignored. The suggestions are filtered while typing, and values already added are no longer suggested; if a suggestion is visible, the Enter key adds the first suggestion or the one highlighted with the arrow keys. Clicking a chip moves it back into the field for editing; the cross removes it.

Add adds the new entry to the list; when editing, Confirm applies the changes.

How helpful was this article?