Skip to content

Android plugin for Unity that lets you list installed apps, get their icons and package names, and launch or open their info pages directly from Unity.

Notifications You must be signed in to change notification settings

ACEKaito1412/AppLinker4Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppLinker4Unity

AppLinker4Unity is a Unity Android plugin (AAR) that allows you to fetch list of installed applications on a device, get app icons, names and perform actions such as opening the app or navigating to its settings page — that you can use on your Unity UI.

I've use this on one of my repo Simple Launcher.


📦 Features

  • Fetch list of all installed launcher apps.
  • Get app names, package names, and app icons (Base64).
  • Open app directly or go to app settings.
  • Unity wrapper included.

🛠️ AAR Setup Requirements

1. Android Manifest Changes

Make sure your AndroidManifest.xml includes the following under your <manifest> tag to allow querying for installed apps. Check the manifest.xml file in the repository.

🔧 How to use the Methods in Plugin

For usage and example of wrapper for the plugin, check the PluginWrapper.cs file in the repository.

Prepare Unity Activity and Library Class

private AndroidJavaClass unityClass;
private AndroidJavaObject javaClass;
private AndroidJavaObject unityActivity;

void Start(){

    unityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
    javaClass = new AndroidJavaObject("com.acekaito.applinker4unity.PluginInstance");
    unityActivity = unityClass.GetStatic<AndroidJavaObject>("currentActivity");
}

Method

recieveUnityActivity(Activity unityActivity) : Must be called first. Passes Unity's current activity to the plugin.

javaClass.CallStatic("recieveUnityActivity", unityActivity);

GetAppNames() : Returns a String[] list of all installed app names.

string[] appList = javaClass.CallStatic<string[]>("GetAppNames");

GetAppIcon() : Returns a String[] list of app icons as Base64 PNGs.

string[] appIconList = javaClass.CallStatic<string[]>("GetAppIcon");

GetAppPackageNames() : Returns a String[] list of app package names.

string[] appPackageList = javaClass.CallStatic<string[]>("GetAppPackageName");

OpenApp(String packageName) : Launches the app using the provided package name.

javaClass.CallStatic("OpenApp", packageName);

OpenAppInfo(String packageName) : Opens the app's settings/info page.

javaClass.CallStatic("OpenAppInfo", packageName);

Latest Build

About

Android plugin for Unity that lets you list installed apps, get their icons and package names, and launch or open their info pages directly from Unity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published