EMM support is controlled by the
emm_support_enabled build flag in default.json. It is enabled by default (true) in production builds.What EMM enables
Backend pre-configuration
Push a default backend URL so users connect to your on-premises or custom Wire server without manual setup.
SSO pre-configuration
Supply a default SSO code so users are taken directly to your identity provider login without entering a code.
Persistent WebSocket
Enforce a persistent WebSocket connection for all accounts, ensuring reliable push delivery in managed environments.
Feedback reporting
Configuration application status (success or error) is reported back to the MDM console via Android Keyed App States.
Configuration flow
Wire evaluates managed configurations at three distinct moments:- App start —
ManagedConfigurationsManageris initialised and reads the current restrictions from Android’sRestrictionsManager. - App resume — Configurations are re-read in case the MDM console pushed an update while the app was in the background.
- Broadcast receiver triggered — The OS broadcasts
ACTION_APPLICATION_RESTRICTIONS_CHANGEDwhenever the MDM console changes a restriction.ManagedConfigurationsReceivercatches this intent and refreshes all configurations immediately.
| Situation | Result |
|---|---|
| Valid managed config found | Used as the default for ViewModels via DI |
| Config present but invalid | Falls back to default.json app defaults |
| No managed config set | Falls back to default.json app defaults |
ManagedConfigurationsManager rather than reading default.json directly, so they always receive whichever value is currently active.
AndroidManifest changes
EMM support requires a<meta-data> element at the application level pointing to the managed configuration schema:
res/xml/app_restrictions.xml) declares the supported restriction keys so that EMM consoles can display them in their UI.
Managed configuration keys
All keys are declared inManagedConfigurationsKeys and exposed through res/xml/app_restrictions.xml.
default_server_urls (string)
A JSON string describing the Wire backend endpoints the app should connect to by default.
Unified format — a single configuration object:
ManagedConfigParser) detects which format is in use automatically. For context-mapped format, it resolves the configuration for the current Android user ID (calculated as Process.myUid() / 100000), falling back to the "default" key if the specific user ID is not present.
All six endpoint URLs are validated with isValidWebUrl(). If any URL is invalid the configuration is rejected and app defaults are used.
sso_code (string)
A JSON string containing a UUID that identifies the enterprise SSO configuration on the Wire backend:
keep_websocket_connection (boolean)
When set to true, Wire enforces a persistent WebSocket connection for all accounts and prevents users from changing this setting. Defaults to false.
When MDM enforcement switches from false to true, Wire immediately enables persistent WebSocket for all existing accounts and starts the foreground service.
Build flag: emm_support_enabled
emm_support_enabled in default.json controls whether the EMM subsystem is active at all. When false, ManagedConfigurationsManager is not initialised and managed configurations are not read.
Build flags: team_app_lock and team_app_lock_timeout
These flags configure the app-lock feature for team deployments:
| Flag | Type | Default | Description |
|---|---|---|---|
team_app_lock | boolean | false | When true, the app lock is enforced and users cannot disable it. |
team_app_lock_timeout | integer | 60 | The number of seconds of inactivity after which the app lock activates. |
Feedback reporting
After each configuration refresh the result is reported back to the MDM console using the Android Enterprise Feedback API (KeyedAppStatesReporter). This allows administrators to see in their EMM console whether Wire successfully applied the managed configuration or encountered an error.
Each configuration key reports one of:
- Info severity — configuration was applied or was cleared.
- Error severity — the configuration value was present but invalid (e.g., malformed JSON or an invalid URL).
Key classes
| Class | Location | Responsibility |
|---|---|---|
ManagedConfigurationsManager | emm/ | Central coordinator; holds current resolved config; calls RestrictionsManager |
ManagedConfigurationsReceiver | emm/ | BroadcastReceiver for ACTION_APPLICATION_RESTRICTIONS_CHANGED; triggers refresh |
ManagedConfigParser | emm/ | Parses unified and context-mapped JSON formats |
AndroidUserContextProvider | emm/ | Resolves the current Android user ID for context-mapped configs |
ManagedConfigurationsReporter | emm/ | Sends Keyed App States feedback to the MDM console |
ManagedServerConfig | emm/ | Data class for the server endpoint configuration |
ManagedSSOCodeConfig | emm/ | Data class for the SSO code configuration |