# Advanced
Source: https://docs.managexr.com/3d-environment-sdk-reference/advanced
## What's inside an mxrus file?
The .mxrus format is a .zip renamed and comprises of AssetBundles and some metadata files. You can use 7zip or a similar tool to extract an mxrus
file and see what's inside.
The scene is exported as a collection of three AssetBundles:
* `assets` (assets used in your scene)
* `scene` (scene hiararchy)
* `*.unitygenerated` (Unity generated metadata, name is same as the mxrus file you're exporting)
Along with the above, the file also has some metadata:
* `build_report.txt` (A prettified BuildReport of the AssetBundle exports)
* `mxr_env_preview.jpg` (A preview of the environment seen from the user starting position and direction)
## Reducing mxrus file size
The ManageXR Web Console has limits on the size of the mxrus file you can upload. This makes export size optimization necessary. When you finish
exporting an mxrus file, a build report is shown which lists the files that have been packaged in the export, along with their uncompressed size.
Usually, textures contribute the most to the export size and is also easy to reduce.
**Eliminate textures you don't need**\
A material may be using several maps for example base/albedo, normal, height, metallic, normal and illumination. You can often remove most of them
without significant loss in visual quality.
For example, in the official 'ManageXR Bungalow' environment, almost all the models use just a base/albedo map. Additional maps are used for only very specific objects.
**Reduce the texture resolution**\
Sometimes textures are imported at very high resolutions. When using models from a 3rd party assets, it's not uncommon for them to be imported at 2048x2048
pixels by default.
Depending on how central an object is to your environment or how close it is to the users location, you can often reduce it to as less as 256x256
without being noticeable.
**Fix NPOT textures**\
Textures with "non power of two" width or height cannot be compressed effectively. Resizing your texture files to the closest 2^n resolution will allow
Unity to significantly reduce their size.
The Unity inspector provides a dropdown under `Advanced/Non-Power of 2` that allows you to change the import resolution without making the changes to the original image file.
Here's an example of a 502x512 image which as an NPOT texture is significantly large at 1.3MB, but addressing the issue reduces it to 341KB.
(See the )
| Original | Fixed |
| -------------- | -------------- |
|
|
|
**Double check texture references after shader change**\
Often times a 3rd party asset uses a custom shader. Consider for example that has the following texture map slots:
* albedo
* normal
* alpha
* waterMask
If you change a material from this shader to `Universal Render Pipeline/Lit`, you might see the inspector correctly showing
albedo and normal in the new `Lit` shader slots and alpha and waterMask not longer listed.
However, when you export your environment, you may still see the alpha and waterMask textures listed in the build report. The reason is that
the material is still referencing the old texture files, those texture slots are just not serialized, so you can't see them in the inspector.
To solve this, change your inspector to Debug mode by pressing the ellipses button on the top right of the inspector panel and change from `Normal` to `Debug`
This will allow you to see these referenced but non-serialized textures in the inspector under `Saved Properties/Tex Envs`. Expand all entries and find
any references to a texture you don't need.
## Loading mxrus files at runtime
If you're using our [Unity SDK](https://docs.managexr.com/sdk-reference/introduction) to make a custom app launcher, you will need to detect when an environment has been deployed to the device's configuration.
When an environment is deployed, an `EnvironmentFile` would be made available in the runtime settings summary.
The EnvironmentFile class is defined as:
```
public class EnvironmentFile {
public string id = string.Empty;
public string name = string.Empty;
public string path = string.Empty;
public long size = 0;
public EnvironmentFileType fileType = EnvironmentFileType.MXRUS;
}
```
Note:
* This object can be accessed using `MXRManager.System.RuntimeSettingsSummary.customLauncherSettings.backgroundSettings.environmentFile`
* `MXRManager.System.OnRuntimeSettingsSummaryChange` is fired every time runtime settings summary is updated
The key fields in `EnvironmentFile` class are:
* `id` can be used to uniquely identify an environment file
* `path` is the sub path inside the ManageXR directory where the mxrus file is located
A `SceneLoader` class in mxrus-sdk allows you to load mxrus files at runtime. Using the `Load` method, you can load the mxrus file into memory.
Here's an example of a simple:
```
// Defined outside
SceneLoader sceneLoader = new SceneLoader();
string shownSceneName;
// This method gets called when a new environmentFile is found.
// Use the OnRuntimeSettingsSummaryChange event and check environmentFile.id to detect when this happens
async void ShowEnvironment() {
string path = MXRManager.System.RuntimeSettingsSummary.customLauncherSettings.backgroundSettings.environmentFile.path;
// path is a subpath inside the ManageXR directory, get the full path
string fullPath = MXRStorage.GetFullPath(path);
// Try to load the mxrus file into memory
bool success = await sceneLoader.Load(fullPath);
if(success) {
// If mxrus file was loaded successfully, load the Unity scene using sceneLoader.SceneName
await SceneManager.LoadSceneAsync(sceneLoader.SceneName, LoadSceneMode.Additive);
var scene = SceneManager.GetSceneByName(sceneLoader.SceneName);
// Check if the scene was successfully loaded by Unity into the scene hierarchy
// If so, set that as the active scene
if (scene != null && scene.IsValid() && scene.isLoaded) {
SceneManager.SetActiveScene(scene);
shownSceneName = sceneLoader.SceneName;
}
}
}
// This method is called when environmentFile in runtime settings summary becomes null or its id changes.
// Use the OnRuntimeSettingsSummaryChange event to detect when this happens
async void HideEnvironment() {
await SceneManager.UnloadSceneAsync(shownSceneName);
shownSceneName = string.Empty;
}
```
## Built-in to URP gotchas
Changing your render pipeline from Built-In to URP may result in some materials turning pink if they're using shaders incompatible with URP (for example the Stardard shader used in Built-In Render Pipeline)
-> To fix, select the materials and click on `Unity toolbar > Edit > Rendering > Materials > Convert Selected Built-in Materials to URP`. Check if the material gets updated correctly. If not, resolve manually.
# Introduction
Source: https://docs.managexr.com/3d-environment-sdk-reference/introduction
## Overview
> ⭐ This SDK is currently in Beta! Please report any issues via GitHub or email us at [support@managexr.com](mailto:support@managexr.com)
With ManageXR's 3D Environment SDK (mxrus-sdk), you can export a custom Unity scene to use as the immersive environment for your [custom VR home screen](https://help.managexr.com/en/articles/5651012-home-screen-features-and-customizations). Building your own 3D environment gives you maximum control and customization over your end user experience.
This package provides you the tools to export Unity scenes, required assets and relevant metadata into MXRUS (ManageXR Unity Scene) files with the `.mxrus` extension and to verify that your Unity scenes meet the compatibility requirments.
[Go to 3D Environment SDK (mxrus-sdk) repository on Github](https://github.com/ManageXR/mxrus-sdk/tree/main)
## Features
The ManageXR 3D Environment SDK (mxrus-sdk) allows you to build and export fully customized Unity scenes as immersive VR environments for your custom home screen.
By using this Unity Editor-based SDK, you can take full advantage of Unity's powerful scene-building tools while seamlessly exporting to the .mxrus format. Key benefits include:
* Familiar Unity workflow: Create immersive environments using tools and techniques already familiar to Unity developers.
* Support for a wide range of Unity features. Including but not limited to:
* Baked and realtime lighting
* Terrain tools
* Particle systems
* UI and TextMeshPro
* Animation tools
* Custom shaders
* Environment audio using AudioSource
* Unity's profiling tools to optimize your environment
* Access to third-party assets through the [Unity Asset Store](https://assetstore.unity.com/)
If you're building a custom launcher app using our [Device SDK](../sdk-reference/introduction), the SDK’s `SceneLoader` class offers a streamlined API that automatically extracts and loads `.mxrus` files at runtime. For more information on loading an `mxrus` file at runtime inside your Unity app, see the "Advanced" section.
# Limitations
Source: https://docs.managexr.com/3d-environment-sdk-reference/limitations
Layers and tags are not supported.
### List of supported components
* Light
* LightProbeGroup
* ReflectionProbe
* LODGroup
* MeshRenderer
* SkinnedMeshRenderer
* SpriteRenderer
* TrailRenderer
* LineRenderer
* SortingGroup
* ParticleSystem
* Terrain
* AudioSource
* UI canvas and built-in UI elements like Image, RawImage, Text
* TextMeshPro
### List of supported shaders
Shaders under the following name hierarchies are supported.
* `Universal Render Pipeline/*`
* `Unlit/*`
* `UI/*`
* `Sprites/*`
* `Skybox/*`
### Validation issue details
The following issues may appear when vaidating your scene for export:
| Issue | Prevents Export | Cause | Fix |
| --------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `UnsupportedShader` | No | You're using a custom shader that's not supported. It may or may not run as expected. It is advised you test your environment on a small number of devices before deploying them at scale. | Use one of the supported shaders if possible |
| `NonBakedLight` | No | You're using a realtime or mixed light which may cause performance issues. | Unless really required, bake your lighting for better performance. |
| `UnsupportedRenderPipeline` | Yes | Render Pipeline is not URP | Create a `URP Asset (with Universal )` and set that in your Graphics Settings |
| `CustomScriptFound` | Yes | You've attached a custom MonoBehaviour script on a GameObject in your scene | Remove the component, custom scripts are not supported |
| `CameraFound` | Yes | You have a Camera on the scene | Remove the Camera from the scene |
| `EventSystemFound` | Yes | You have an `EventSystem` component on the scene | Remove the component from the scene |
| `NoUserAreaProviderFound` | Yes | You don't have a user area provider on the scene | Create an empty GameObject and setup the `MonoCircularUserAreaProvider` component to it |
| `AudioListenerFound` | Yes | You have an `AudioListener` component on the scene | Remove any `AudioListener` components from the scene |
| `SceneNameViolation` | Yes | Your scene name isn't allowed | Rename the scene you're trying to export. The following names are not allows: Launcher, Video, OculusQuest, Pico, Wave |
# Setup
Source: https://docs.managexr.com/3d-environment-sdk-reference/setup
## Requirements
To work with the mxrus-sdk package, you need to design your environments in a Unity project that uses:
* Unity 2021.3.x (recommended) or older
* Universal Render Pipeline (URP) version 12.1.14
## Installation
### Instructions
Install the latest version of the SDK.
1. Go to your project manifest json file located at `Packages/manifest.json`
2. Add this line to your dependency list:
`"com.mxr.mxrus.sdk":"https://www.github.com/ManageXR/mxrus-sdk.git#VERSION"`
* `VERSION` is the SDK version you want to install
* For example, if you want to install version `v0.2.0`, the line should be `"com.mxr.mxrus.sdk":"https://www.github.com/ManageXR/mxrus-sdk.git#v0.2.0"`
We recommend installing the latest version of the SDK so you have access to the recent improvements and fixes. [Version history can be found here](https://github.com/ManageXR/mxrus-sdk/releases)
### Changing the SDK version
If you want to move to a different SDK version (for example, when a new version is released and you want to upgrade), open `Packages/manifest.json` and change the version in the `"com.mxr.mxrus.sdk"` dependency line and refresh your Unity project.
# Usage
Source: https://docs.managexr.com/3d-environment-sdk-reference/usage
### Start your project
* Create (or open) a Unity project. Ensure the Unity version is **Unity 2021.3 or below**
* Import the URP `12.1.14` package
* Create a URP Asset in your Project view using `Right Click > Create > Rendering > URP Asset (with Universal Renderer)`
* Set the URP Asset in your Graphics Settings by going to `Project Settings > Graphics > Scriptable Render Pipeline Settings`
**Don't normally use URP?**
Learn about a [common issue moving from Built-In to URP](../3d-environment-sdk-reference/advanced#built-in-to-urp-gotchas) and how to avoid it.
### Create your environment
1. Use the Unity workflow to design your scene
2. Set the user's location and walkable area within your environment:
1. **Create a GameObject** and add the `MonoCircularUserAreaProvider` component to it.
2. **Ensure that Gizmos are enabled** in your Scene view. You should see a blue avatar with concentric circles around it. The position and rotation of the avatar determine the location and direction the user will start at. The VR Home Screen menu will appear in front of the user when they are in this position in your environment.
3. **Change the `Walkable Radius` value of the `MonoCircularUserAreaProvider` component**. The concentric circles will update to reflect the new value. Set this value to match the area you want the user to be able to walk around in.
**Important Design Tips**
Since your Unity scene will run on standalone VR headsets, ensure that the scene is optimized for mobile devices.
* Try to keep your triangle count low
* Use mobile friendly shaders
* Bake lighting as much as possible
* Avoid very complex particle systems with high particle count
* Try to keep your draw calls/batches low.
### Validate and export your scene
1. Go to `Unity toolbar > MXR > Scene Exporter`. A window titled `MXR Scene Exporter` will open.
2. Click on the `Validate` button. This will validate your scene and violations (if any) in your scene will be highlighted. Click on an issue to expand it. A brief description and any relevant GameObject or Asset will be shown.
* Issues shown in red will *prevent* export unless you address them
* Issues shown in yellow are warnings which don't prevent exporting but highlight potential compatibility or performance problems.
* [View the list of possible validation issues](../3d-environment-sdk-reference/limitations#validation-issue-details) and recommended fixes
If you have no export-preventing issues, click the `Export Scene` button to export the file ✅
### Check the size and optimize
Now that you've exported your scene, it's time to verify that the size of your environment is within the **recommended size limit of 30MB**.
Once your `mxrus` file has finished building and has exported, you'll see a **build report** that will show the different assets that have been packaged. Use the build report to verify the size of your environment and identify large assets to optimize or remove:
**Build Report Tips**
* Click on an asset to highlight it in your Project view so that you can easily locate it.
* Use the asset type dropdown to review different assets such as shaders, textures, meshes and more.
See the Advanced section for more tips on reducing export size.
### Deploy on ManageXR
To upload and deploy your custom 3D environment on ManageXR:
1. Go to the **Configurations** tab
2. Select your configuration
3. Select **Device Experience** - Note, you must be using Custom Home, Kiosk App, or Kiosk Video
4. Under the home screen preview image, select **Logo & Background**
5. Scroll down to Background. Select **3D Environment**
6. Click on the dropdown and select **+ Custom**
7. Drag and drop your environment file
8. Give it a nickname
9. Press **Upload**
10. **Save Changes** on your configuration
The next time your devices come online, they will download and begin using your custom 3D environment! Note, you can re-use this environment on other configurations without re-uploading it.
# List Organizations
Source: https://docs.managexr.com/api-reference/endpoint/list-organizations
GET /organizations
Retrieve a list of all organizations that can be controlled with a given API Key
Need a multi-org API key? Email support@managexr.com for early access to a single API key that allows you to control multiple organizations
# Send Batch Command
Source: https://docs.managexr.com/api-reference/endpoint/v1/batch-commands
Post /v1/devices/batch-command
Send a command to multiple devices at once
Available Commands: Launch App, Play/Pause Video, Launch Web Url, Disable/Enable Kiosk, Restart, Power Off, Set Volume, Set Brightness, Uninstall App, Sync, Enable/Disable Tutorial Mode
# Create Release Channel
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-app-release-channel
Post /v1/apps/{packageName}/release-channels
Add a new release channel for an app and assign it an app version
# Create App Version
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-app-version
Post /v1/apps/{packageName}/versions
Create a managed app version (Self-Hosted Only). Adds a new version of a self-hosted application. To create and upload a new app version to our servers, use the [ManageXR CLI](https://docs.managexr.com/cli-reference/command/upload-app)
# Create Configuration
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-configuration
Post /v1/configurations/
Create a new configuration. Creates a blank configuration with default settings and no content.
# Create App
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-externally-hosted-app
Post /v1/apps/
Create a managed app (Self-Hosted Only). Add an applictation to your ManageXR library that you are hosting on your own servers. To create and upload an application to our servers, use the [ManageXR CLI](https://docs.managexr.com/cli-reference/command/upload-app).
# Create Files
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-files
Post /v1/files/
Create self-hosted files in your ManageXR Files library.
Once created, you can use Edit App Version or [Edit Configuration](https://docs.managexr.com/api-reference/endpoint/v1/edit-configuration) to deploy the file with an app version or on a configuration, respectively.
To create files hosted on ManageXR's servers, use the [ManageXR CLI](https://docs.managexr.com/cli-reference/introduction)
# Create Tag
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-tag
Post /v1/tags/
Create a new tag
# Create Wi-Fi Network
Source: https://docs.managexr.com/api-reference/endpoint/v1/create-wifi-network
Post /v1/wifi-networks
Add a new Open, WPA2 or WPA2-Enterprise Wi-Fi network to your Library
# Delete App
Source: https://docs.managexr.com/api-reference/endpoint/v1/delete-app
DELETE /v1/apps/{packageName}
Removes application and all versions from ManageXR.
# Delete Release Channel
Source: https://docs.managexr.com/api-reference/endpoint/v1/delete-app-release-channel
Delete /v1/apps/{packageName}/release-channels/{releaseChannelId}
Deletes an app release channel. If shared with client organizations, deleting also unshares the release channel.
# Delete App Version
Source: https://docs.managexr.com/api-reference/endpoint/v1/delete-app-version
Delete /v1/apps/{packageName}/versions/{versionId}
Deletes a specific app version
| App type | Deletion scope |
|---------------|---------------|
| managed app | Deletes the specified managed app version. This also deletes all release channels that target this managed version. See [Delete release channel](https://docs.managexr.com/api-reference/endpoint/v1/delete-app-release-channel). |
| shared app | Deletes the specified shared version in the recipient organization only (owner org keeps its copy) |
# Delete Configuration
Source: https://docs.managexr.com/api-reference/endpoint/v1/delete-configuration
Delete /v1/configurations/{id}
Removes a configuration from ManageXR.
You cannot delete configurations that are currently applied to devices.
# Delete Tag
Source: https://docs.managexr.com/api-reference/endpoint/v1/delete-tag
DELETE /v1/tags/{tagId}
Delete a tag
# Duplicate Configuration
Source: https://docs.managexr.com/api-reference/endpoint/v1/duplicate-configuration
POST /v1/configurations/duplicate
Creates a new configuration by cloning an existing one.
# Edit App
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-app
PATCH /v1/apps/{packageName}
Update an app's metadata such as title, description, categories, and icon URL
# Edit Release Channel
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-app-release-channel
Patch /v1/apps/{packageName}/release-channels/{releaseChannelId}
Update the target app version or name of an existing app release channel
# Edit App Version
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-app-version
Patch /v1/apps/{packageName}/versions/{versionId}
Edit a managed app version. Apply a new version label or edit the app version's bundled files.
# Edit Configuration
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-configuration
Patch /v1/configurations/{id}
Update an existing configuration to change the content deployed
(e.g., update app versions, add/remove apps, videos, and WebXR links).
# Edit Device
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-device
Patch /v1/devices/{id}
Update device metadata or apply a new configuration
# Edit Tag
Source: https://docs.managexr.com/api-reference/endpoint/v1/edit-tag
PATCH /v1/tags/{tagId}
Update an existing tag's name
# Get App
Source: https://docs.managexr.com/api-reference/endpoint/v1/get-app
Get /v1/apps/{packageName}
Returns information about a specific app including the title, iconUrl, categories, and number of versions.
# Get App Version
Source: https://docs.managexr.com/api-reference/endpoint/v1/get-app-version
Get /v1/apps/{packageName}/versions/{versionId}
Returns a single app version by its unique id.
# Get Configuration
Source: https://docs.managexr.com/api-reference/endpoint/v1/get-configuration
Get /v1/configurations/{id}
Retrieve a configuration by id.
# Get Device
Source: https://docs.managexr.com/api-reference/endpoint/v1/get-device
Get /v1/devices/{id}
Retrieve a device by id (serial number)
# Get Device Sync Status
Source: https://docs.managexr.com/api-reference/endpoint/v1/get-device-sync-status
Get /v1/devices/{id}/sync-status
Retrieve app sync status details for devices. For a device's overall up-to-date status, use the top-level `outOfDate` boolean on `GET /v1/devices/{id}`. This endpoint provides per-app detail.
# List Release Channels
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-app-release-channels
Get /v1/apps/{packageName}/release-channels
Returns a list of all release channels for a given application
# List App Versions
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-app-versions
Get /v1/apps/{packageName}/versions
Returns a list of all app versions for a given package name
# List Apps
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-apps
Get /v1/apps/
List all applications present in organization. This lists top-level application info. To access app versions and specific version info, use [List App Versions](https://docs.managexr.com/api-reference/endpoint/v1/list-app-versions)
# List Configurations
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-configurations
Get /v1/configurations/
Retrieve all configurations.
# List Device Sync Status
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-device-sync-status
Get /v1/devices/sync-status
Retrieve sync status details for devices. Currently supports fetching app sync statuses (installed vs. target version) only.
# List Devices
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-devices
Get /v1/devices/
Retrieve a list of devices
# List Files
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-files
Get /v1/files/
List all files present in the organization's library
# List WebXR Links
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-links
Get /v1/links
Returns all WebXR links stored in the organization’s library.
# List Videos
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-videos
Get /v1/videos
Returns all videos stored in the organization’s library.
# List Wi-Fi Networks
Source: https://docs.managexr.com/api-reference/endpoint/v1/list-wifi-networks
Get /v1/wifi-networks
Returns all Wi‑Fi networks stored in the organization’s library.
# Send Command
Source: https://docs.managexr.com/api-reference/endpoint/v1/send-command
Post /v1/devices/{id}/command
Send command to a specific device
Available Commands: Launch App, Play/Pause Video, Launch Web Url, Disable/Enable Kiosk, Restart, Power Off, Set Volume, Set Brightness, Uninstall App, Sync, Enable/Disable Tutorial Mode
# Pause Updates
Source: https://docs.managexr.com/api-reference/endpoint/v1/set-pause-updates
Post /v1/devices/set-pause-updates
Pause or resume configuration updates for devices.
Pausing configuration updates stops a device from syncing with its latest Configuration. User-initiated changes to Configurations and ManageXR-initiated updates to the ManageXR Admin App and Home Screen will not propagate to devices with updates paused.
# Share Release Channel
Source: https://docs.managexr.com/api-reference/endpoint/v1/share-app-release-channel
Post /v1/apps/{packageName}/release-channels/{releaseChannelId}/share
Share an app release channel with a client organization. The API key used must be a multi-org key with access to the client organizations to use this endpoint.
# Unshare Release Channel
Source: https://docs.managexr.com/api-reference/endpoint/v1/unshare-app-release-channel
Post /v1/apps/{packageName}/release-channels/{releaseChannelId}/unshare
Unshare an app release channel with a client organization
# Introduction
Source: https://docs.managexr.com/api-reference/introduction
ManageXR API keys, authentication, and rate limiting
## Base URL
The ManageXR API provides a RESTful way to access your organization and device data. We enforce HTTPS.
All requests contain the following base URL:
```
https://managexrapi.com
```
## Authentication
### Create an API Key
Go to Organization Settings > API Keys to generate a key
Email [support@managexr.com](mailto:support@managexr.com) for early access to a single API key that allows you to control multiple organizations
### Authenticate Requests
To authenticate each request, add an Authorization header with the contents:
```
Authorization: Basic
```
where `` is the Base64 encoding of `api_key_id:api_key_secret`.
## Quotas & Limits
API requests are subject to the following limits:
| Limit Type | Premium Tier | Enterprise Tier |
| ------------------------------------ | ------------ | --------------- |
| Requests per second per organization | 10 | Contact |
| Requests per month per organization | 2,500,000 | Contact |
You will be given direct feedback if you are over quota and your requests will fail. If you have requirements above this and would like to discuss expanding your quota, contact us at [support@managexr.com](mailto:support@managexr.com).
# duplicate-app-version
Source: https://docs.managexr.com/cli-reference/command/duplicate-app
Duplicate an existing app version in your ManageXR organization
## Usage
```
Usage: mxr-cli duplicate-app-version --bundle-directory /path/to/directory /path/on/device
Positionals:
package_name Package name of the application (string)
version_code Version code (number)
version_name Version name (string)
version_label Label applied to existing version you wish to duplicate (string) - You must supply the label if one exists.
Options:
--bundle-directory, --bd Path to a local directory containing files to upload as bundled files.
--new-version-label, -vl Label to differentiate an app version from others with the same version code and name. If none set, label with timestamp will automatically be applied.
--release-channel, -r Name of the release channel. If release channel with this name exists for this application, the release channel will be updated to target this app version. If it does not exist, a new release channel will be created with the name supplied.
-k, --api-key-file Path to JSON file containing ManageXR API Key id and secret [string]
-v, --verbose If set, log additional output on errors. [boolean]
-h, --help Show help [boolean]
```
## Examples
### 1. Using JSON file auth
```
mxr-cli duplicate-app-version com.myapp.quest 42 "4.2.0" "Stable" --api-key-file /path/to/api_key.json
```
### 2. Using environment variable auth
```
MXR_API_KEY_ID="xxx" MXR_API_KEY_SECRET="xxx" mxr-cli duplicate-app-version com.myapp.quest 42 "4.2.0" "Stable"
```
### 3. Duplicate with new version label and release channel
This example duplicates an existing app version and:
* `--new-version-label` sets a new label "Beta" for the duplicated version
* `--release-channel` publishes the duplicated app version to the "Dev" release channel
```
mxr-cli duplicate-app-version com.myapp.quest 42 "4.2.0" "Stable" --new-version-label "Beta" --release-channel "Dev" --api-key-file /path/to/api_key.json
```
### 4. Duplicate with bundled files
Duplicate an app version with [bundled files](https://help.managexr.com/en/articles/8013220-bundle-files-with-your-app) and choose the location where the files should be installed on devices
* `--bundle-directory` uploads files stored at /path/to/directory on local machine as bundled files
* `/path/on/device` optional path to location on device where bundled files will be installed e.g., `Android/obb/com.your.app`
```
mxr-cli duplicate-app-version com.myapp.quest 42 "4.2.0" "Stable" --bundle-directory /path/to/directory /path/on/device --api-key-file /path/to/api_key.json
```
# upload-app
Source: https://docs.managexr.com/cli-reference/command/upload-app
Upload an app to your ManageXR organization
## Usage
```
Usage: mxr-cli upload-app
Positionals:
apk-file, a Path to APK file to upload [string]
Options:
-k, --api-key-file Path to JSON file containing ManageXR
API Key id and secret [string]
-o, --obb-file Path to OBB file associated with the
apk [string]
-t, --title Set app title in ManageXR. If not set,
will use previous app version's name or
parse name from APK. [string]
-d, --description Set app description in ManageXR. If not
set, will use previous version's
description or leave blank. [string]
-r, --release-channel Name of release channel. If release
channel with this name exists, the
release channel will be updated to
target this app version. If release
channel with this name does not exist,
create a new release channel targeting
this app version. [string]
--version-label, --vl An optional label to differentiate an
app from others with the same version
code and name. [string]
-v, --verbose If set, log additional output on
errors. [boolean]
--bundle-directory, --bd Path to a local directory containing
files to upload as a bundle with the
App. Optionally, also a destination
path on the device for the files to be
uploaded to. [array]
--always-upload-all-files, --auaf Skip MD5 checksums and always upload
all files in the bundle directory.
[boolean]
-h, --help Show help [boolean]
```
## Examples
### 1. Using JSON file auth
```
mxr-cli upload-app /path/to/apkfile.apk --api-key-file /path/to/api_key.json
```
### 2. Using environment variable auth
```
MXR_API_KEY_ID="xxx" MXR_API_KEY_SECRET="xxx" mxr-cli upload-app /path/to/apkfile.apk
```
### 3. Upload and Publish to Release Channel
This example uses the following options
* `--obb-file` to upload an obb with the apk
* `--title` to set the app title in ManageXR as "Cool new app"
* `--description` to set the app description in ManageXR as "This app is amazing"
* `--release-channel` to publish the new app version to the "Dev" release channel
and a JSON file for auth.
```
mxr-cli upload-app /path/to/apkfile.apk --obb-file /path/to/obbfile.obb --title "Cool new app" --description "This app is amazing" --release-channel "Dev" --api-key-file /path/to/api_key.json
```
### 4. Upload with bundled files
Upload an app with [bundled files](https://help.managexr.com/en/articles/8013220-bundle-files-with-your-app) and choose the location where the files should be installed on devices
* `--bundle-directory` uploads files stored at /path/to/directory on local machine as bundled files
* `/path/on/device` optional path to location on device where bundled files will be installed e.g., `Android/obb/com.your.app`
```
mxr-cli upload-app /path/to/apkFile.apk --bundle-directory /path/to/directory /path/on/device --api-key-file /path/to/api_key.json
```
# upload-file
Source: https://docs.managexr.com/cli-reference/command/upload-file
Upload a file to your ManageXR organization
## Usage
```
Usage: mxr-cli upload-file
Positionals:
file-path, f Path to file to upload [string]
Options:
-k, --api-key-file Path to JSON file containing ManageXR API Key id and
secret [string]
-n, --name Set file name in ManageXR. If not set, will use the
existing file name. [string]
-d, --description Set file description in ManageXR. [string]
-h, --help Show help [boolean]
```
## Examples
### 1. Using JSON file auth
```
mxr-cli upload-file /path/to/file.ext --api-key-file /path/to/api_key.json
```
### 2. Set the file's name and description on ManageXR
```
mxr-cli upload-file /path/to/file.ext --name "Fun File" --description "This is the best file ever" --api-key-file /path/to/api_key.json
```
# Introduction
Source: https://docs.managexr.com/cli-reference/introduction
Use the ManageXR CLI to automate app uploads and deployments
## Overview
The ManageXR CLI is a useful tool to automate the process of uploading applications to ManageXR. You can use the CLI in your CI/CD pipeline to upload new app versions to your ManageXR organization and publish versions to [release channels](https://help.managexr.com/en/articles/5518816-release-channels).
## Getting Started
The `mxr-cli` is available as an NPM package or a binary executable. To get started select one of the three quick set up options below.
### Choose one of:
#### (A) Install using NPM
Paste in your terminal to install:
```
npm install -g @managexr/mxr-cli
```
Then, run using `mxr-cli`:
```
mxr-cli [options]
```
#### (B) Run using NPX
Use `npx` to directly run a CLI command *without* an `npm install`:
```
npx @managexr/mxr-cli [options]
```
#### (C) Run using a binary
If your machine does not have `node.js`, you can use a binary executable instead. Download the binary for your machine:
* [Download for Linux](https://mighty-platform-prod.appspot.com/cli/download?os=linux)
* [Download for Mac](https://mighty-platform-prod.appspot.com/cli/download?os=mac)
* [Download for Windows](https://mighty-platform-prod.appspot.com/cli/download?os=win)
Then, run the binary using:
```
path/to/mxr-cli [options]
```
On Mac and Linux machines, you may need to grant executable permissions to the binary before you can run it. To do this, run `chmod +x path/to/mxr-cli`.
### Authenticate Commands
Each CLI command must include valid authentication. Authenticate commands using ManageXR API Keys.
1. **Create an API Key**
To generate an API Key, go to Organization Settings > API Keys.
2. **Choose one of the following authentication methods for your commands**
(a) Set environment variables for `MXR_API_KEY_ID` and `MXR_API_KEY_SECRET`, *or*
(b) Provide a JSON file as an `--api-key-file` argument to the command
JSON file format:
```
{
"id": "api_key_id",
"secret": "api_key_secret"
}
```
# Feedback
Source: https://docs.managexr.com/feedback
We want to hear from you!
How can we improve our developer tools?
# Introduction
Source: https://docs.managexr.com/introduction
Programmatically control your VR and AR devices
## Overview
Take advantage of ManageXR developer tools to automate workflows, simplify device management, and build easy-to-use apps
Programmatically control your devices and orgs
Deploy new app versions automatically
Enhance your VR apps with MDM superpowers
# Introduction
Source: https://docs.managexr.com/sdk-reference/introduction
The ManageXR Unity SDK helps you build custom menus and experiences by leveraging the capabilities of the ManageXR Admin App running on your device
## Overview
The [ManageXR Unity SDK (Beta)](https://github.com/ManageXR/mxr-unity-sdk/) enables developers to query device status information from the ManageXR Admin App running on your device, including:
* Device Serial Number
* Device Name, Configuration, Tags, etc.
* VR Content library details
* VR Content update download/install status
This SDK drives the ManageXR Home Screen, meaning you can use this to make your own custom home screen from the ground up!
**Usage Examples**
* Create your own Home Screen
* Update users in-headset when an update for you app is downloading/available
* Use device serial / details to augment your app's analytics reporting
* Launch wifi and other settings from within your app
## Getting Started
To get started and view sample projects [visit the Unity SDK Github repo](https://github.com/ManageXR/mxr-unity-sdk/)
We recommend you clone the repo and play it in your editor to understand how the code works. Then you can integrate it into your project by following the Installation steps on Github.
## Feedback
This SDK is in beta. We want to hear from you! To suggest improvements or fixes, [open a Github Issue](https://github.com/ManageXR/mxr-unity-sdk/issues) or contact [support@managexr.com](mailto:support@managexr.com) for additional support.
## Not using Unity?
The Unity SDK is the best way to communicate with the ManageXR Admin App. That said, if you are not using Unity to build your app, you can still query limited information from the ManageXR Admin App (the device serial number) using our Android SDK.
We've put together a sample project that demonstrates how to query the serial number on managed devices. This project is specifically for developers that need this functionality in native Android/Java code. Check it out here: [https://github.com/ManageXR/mxr-android-sdk-serial-sample/tree/master](https://github.com/ManageXR/mxr-android-sdk-serial-sample/tree/master)
# Introduction
Source: https://docs.managexr.com/streaming-sdk-reference/introduction
# ManageXR React Streaming SDK
ManageXR has long offered remote device streaming: the ability to view what is happening on a device in real time. Whether you are showcasing a demo in the same room or troubleshooting a headset on the other side of the world, remote streaming has always made it easy.
The [ManageXR React Streaming SDK](https://www.npmjs.com/package/@managexr/react-streaming#managexr-react-streaming-sdk) enables you to embed ManageXR-powered device streaming directly into any React web app.
***
### Features
* **Live device screen streaming** within your custom React dashboards
* **Integrated user experience** so users never need to switch to external casting tools
* **Flexible for various use cases** including demos, support, monitoring, and more
* **Secure authentication**
***
### Prerequisites
* Devices **must be enrolled** in ManageXR to view streams with the SDK
* An API key with appropriate permissions is required to generate streaming tokens
* A compatible React environment (React 16.8+ to support hooks)
***
### NPM package
[https://www.npmjs.com/package/@managexr/react-streaming#managexr-react-streaming-sdk](https://www.npmjs.com/package/@managexr/react-streaming#managexr-react-streaming-sdk)
```
npm i @managexr/react-streaming
```
***
### Getting Started
For full setup details, refer to the [Usage & Instructions](/streaming-sdk-reference/usage) tab.
# Usage
Source: https://docs.managexr.com/streaming-sdk-reference/usage
## Instructions
### Step 1: Generate a streaming SDK token
See our [API Docs](https://docs.managexr.com/api-reference/introduction) for instructions on authenticating API requests.
You must first generate a token for the devices you want to stream. This token authorizes the SDK to access only the specified devices.
**API Request:**
```bash theme={null}
curl --request POST \
--url https://managexrapi.com/v1/devices/generate-streaming-sdk-token \
--header 'Authorization: Basic ' \
--header 'Content-Type: application/json' \
--data '{ "deviceIds": ["device_id_1", "device_id_2"] }'
```
**Example API Response:**
```
{ "token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }
```
👉 Use this token when initializing the stream in your React app.
### Step 2: Render an instance of useDeviceStream for each device
The connection process will start as soon as the hook is rendered. To end the stream, simply stop rendering the component that contains the hook.
```
import { useDeviceStream } from '@managexr/react-streaming'
const StreamingComponent = ({ deviceId, token }) => {
const { videoRef } = useDeviceStream(deviceId, token)
return (
)
}
```
## API reference
### `useDeviceStream`
`useDeviceStream(deviceId: string, token: string, options?: DeviceStreamOptions) => DeviceStream`
| Argument | Description |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| `deviceId` | ID (serial) of the device to stream from (must be enrolled in ManageXR with the Admin App installed). |
| `token` | Token generated via the `generate-streaming-sdk-token` API. |
| `options` | *(optional)* Configuration options (see below). |
### `DeviceStreamOptions`
| Option | Default | Description |
| ----------------------------- | ------- | --------------------------------------------------------------------------------------------------- |
| `endOtherStreamAutomatically` | `false` | Ends any existing stream on the device before starting this one (avoids `error_already_streaming`). |
### `DeviceStream`
| Property | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `videoRef` | Set this as the `ref` of the `