This guide explains how to set up Android Single Instance Service (ASIS) in Unreal Engine, then how to create, package, and run your Unreal Engine project as an Android application.
Set up Android SDK and NDK
To set up ASIS, you must first set up the Android Software Development Kit (SDK) and Android Native Development Kit (NDK) in Unreal Engine. Unreal Engine uses Android Studio and the Android SDK Command-Line Tools to download and install the Android SDK components required to develop Android projects.
To set up the Android SDK and NDK, follow these steps:
Follow the steps on the Setting Up Android SDK and NDK page.
If you are using Unreal Engine 5.5 or higher, enable the following SDK Platforms and Tools:
SDK Tools > Android SDK Build-Tools 36 > 35.0.0 and 34.0.0
SDK Tools > NDK (Side by side) > 25.1.8937393
SDK Platforms > Android 14.0 ("UpsideDownCake"), API Level 34
Create a New Project from the ASIS Template
After the Android SDK and NDK are installed, you can setup the ASIS template plugin. The plugin is delivered as a separate archive, so manual steps need to be done to prepare the Unreal Engine source code.
Get Unreal Engine source code
Pull the latest source code from the UE5 Main in either Perforce or Github. For more information on using Perforce and Github with Unreal Engine, refer to the following resources:
Set Up the ASIS Plugin
1. Navigate to the ASIS Templates folder.
Navigate to the ASIS Templates folder.
If you're using Perforce, navigate to
UE5_Main\Engine\Restricted\NotForLicensees\Plugins\AndroidSingleInstanceService\Templates\If you're using GitHub, access the
ue5-mainbranch and navigate toue5-main\Engine\Restricted\NotForLicensees\Plugins\AndroidSingleInstanceService.
Copy the TP_HMI_ASIS folder to
UE5_Main\Templates\(Perforce) orue5-main\Templates\(GitHub).Copy the following code and paste it in
UE5_Main\Templates\TemplateCategories.ini(Perforce) orue5-main\Templates\TemplateCategories.ini(GitHub):C++Categories=(Key="HMI", LocalizedDisplayNames=((Language="en",Text="Automotive\nHMI &\nVehicle Cockpit using Android Single Instance Service")), LocalizedDescriptions=((Language="en",Text="Find templates for automotive vehicle cockpit using Android Single Instance Service"), Icon="TP_HMI_ASIS/Media/AutomotiveHMI_2x.png", IsMajorCategory=true)Run UnrealEditor. The Unreal Project Browser should now include a new HMI template:
Click Create. The project should look like the following screenshot:
Add ASIS Plugin to an Existing Project
Add ASIS Plugin to an Existing Project
If you have an existing project you want to add ASIS to, follow these steps:
Go to Edit > Plugins and enable AndroidSingleInstanceService.
Copy the following code and paste it into the
{Project_Name}/Config/DefaultGame.inifile:Config[Staging] +RemapDirectories=(From="Engine/Restricted/NotForLicensees/Plugins/AndroidSingleInstanceService", To="Engine/Plugins/Runtime/AndroidSingleInstanceService") +RemapDirectories=(From="Engine/Restricted/NotForLicensees/Plugins/Experimental/MultiWindow", To="Engine/Plugins/Experimental/MultiWindow")In Unreal Engine, go to Edit > Project Settings.
Under Plugins > AndroidSingleInstanceService, enable the following settings:
Compile ASISProject
Enable asis libs generation
Use AndroidSingleInstanceService
Package and Run the ASIS Project
After setting up ASIS in your Unreal Engine project, you can package and run the project as an Android application.
To package the ASIS project as an Android application, follow these steps:
In the Main Toolbar, click Platforms > Android > Package Project.
Check the Output Log to make sure the build was successful.
The package is saved by default to /Documents/UnrealProjects/_packages/ASIS_Package.
Communicating Between The Android Application and the Unreal Engine APK
After packaging the application, you can use an example client application to communicate with the Unreal Engine APK.
The Unreal Engine package includes 3 main parts:
An APK with Android Service. It is located in the folder that was chosen while project package dialog.
A set of ASIS helper libraries that are used in the client applications.
C++Binaries/Android/aars ├── asisclientlib-1.0.1-debug.aar ├── asisclientlib-1.0.1-debug.jar ├── asiscommon-1.0.1-debug.aar └── asiscommon-1.0.1-debug.jarAn example client application that communicates with the service. This is not located in the packaged Unreal Engine project, but the Binaries folder of your Unreal Engine Project (
\Unreal Projects\{Project_Name}\Binaries\Android).
You can use Android Studio to open the example Android project. It will automatically go through the Android build process when you open it.
You can also build the project using the following command line prompt:
cd {Project_Name}\Binaries\Android\ExampleUseCase_{Project_Name}\
gradlew assembleDebugThis command will generate an APK file at {Project_Name}\Binaries\Android\ExampleUseCase_{Project_Name}\app\build\outputs\apk\debug\app-debug.apk.
In Android Studio, with an Android device selected, you can run the application by pressing Shift + F10, or by clicking the Play button in the top toolbar.
To install the APK on your Android device, run the following adb command:
adb install {Project_Name}.apkIn the application on your device, tap Activate View1, Activate View2, and Activate View3 to view the Android Service communicating with the Unreal Engine application.