# Persistent Foreground App

### Overview

This feature designates a specific app package to be persistently displayed on the foreground, ensuring it remains continuously visible on the screen. This functionality works in both Secured and Open Zones. After a user login, the persistent foreground app will be determined based on configurable criteria, such as user group. This ensures that the app package is readily accessible for specific user groups within secured environments, and provides consistent app access in Open Zones.

### Secured Zone

In secured environments, the persistent foreground app is only displayed for users belonging to specific groups as defined by the administrator.

The sample configuration below displays the persistent app in the Secured Zone. User group restrictions are enforced here, ensuring only authorized users see the app.

```json
"persistedForegroundApp": {
    "intent": {
        "action": "android.intent.action.VIEW",
        "package": "com.bluefletch.ems.support",
        "data": "<data>",
        "flags": 1,
        "typeIntent": "a"
    },
    "criteria_OR": [
        {
            "field": "${session.groups}",
            "pattern": ".*Associates.*"
        }
    ]
},
```

### Open Zone

In open environments, the persistent foreground app is displayed for all users after login, regardless of group affiliation.

The sample configuration below displays the persistent app in the Open Zone. There are no restrictions to whoever can view the persistent app.

```json
"persistedForegroundApp": {
    "intent": {
          "package": "com.bluefletch.ems.support",
          "flags": 335544320,
          "typeIntent": "a"
      },
    "criteria_OR": [
      {
          "field": "${session.groups}",
          "pattern": ".*\\*.*"
      }
    ]
},
```

> Note: If the package is not found or uninstalled, the screen will display the Open or Secured Zone layout, respectively.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/bluefletch-launcher/configurable-layouts/persistent-foreground-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
