Ejemplo n.º 1
0
        public async void OnSelected(Transform t)
        {
            var appEntry = t.gameObject.GetComponent("AppEntry") as AppEntry;

            if (null != appEntry)
            {
                if (appEntry.isRenameMode)
                {
                    this.renameHandler.Rename(appEntry);
                }
                else
                {
                    await Task.Run(() =>
                    {
                        AndroidJNI.AttachCurrentThread();

                        try
                        {
                            // Launch app
                            Debug.Log("Launching: " + appEntry.appName + " (package id: " + appEntry.packageId + ")");
                            AppProcessor.LaunchApp(appEntry.packageId);
                        }
                        finally
                        {
                            AndroidJNI.DetachCurrentThread();
                        }
                    });
                }
            }
        }
Ejemplo n.º 2
0
        public void OnSelected(Transform t)
        {
            var appEntry = t.gameObject.GetComponent("AppEntry") as AppEntry;

            if (null != appEntry)
            {
                // Launch app
                Debug.Log("Launching: " + appEntry.appName + " (package id: " + appEntry.packageId + ")");
                AppProcessor.LaunchApp(appEntry.packageId);
            }
        }