Как я могу совмещать действия в режиме VR и 2D в одном приложении для Android?Android

Форум для тех, кто программирует под Android
Гость
Как я могу совмещать действия в режиме VR и 2D в одном приложении для Android?

Сообщение Гость »


I have an android app for Oculus Quest 2 that operates in VR mode with a single activity.

I would like to add a second activity that uses normal widgets instead of VR.

I know it is possible to run non-VR android apps on the Oculus Quest 2. If I extend my application with a new non-VR activity that has the MAIN and LAUNCHER intent-filter and leave the com.oculus.intent.category.VR on the original activity, I can start the app and see the UI in a 2D window floating in the VR environment.

But when I startActivity() for the VR Activity, I see crashes in the logcat.

2023-08-24 10:14:49.784 27370-27784 VrRuntimeClient com.x.project I UpdateEvents: HMT was mounted 2023-08-24 10:14:49.784 27370-27784 VrRuntimeClient com.x.project I Client has lost focus. 2023-08-24 10:14:49.796 27370-27784 OsSdk com.x.project E error getting shared memory region, memory type: HeadTracker, failed with Status(-1, EX_SECURITY): 'request throttled' 2023-08-24 10:14:49.800 27370-27784 AudioCapture com.x.project I AudioCapture::PauseAudioCapture 2023-08-24 10:14:49.801 27370-27784 OsSdk com.x.project E error getting shared memory region, memory type: HeadTracker, failed with Status(-1, EX_SECURITY): 'request throttled' 2023-08-24 10:14:49.802 27370-27784 OsSdk com.x.project E error getting shared memory region, memory type: HeadTracker, failed with Status(-1, EX_SECURITY): 'request throttled' 2023-08-24 10:14:49.802 27370-27784 OsSdk com.x.project E error getting shared memory region, memory type: HeadTracker, failed with Status(-1, EX_SECURITY): 'request throttled' 2023-08-24 10:14:49.802 27370-27784 Telemetry com.x.project W [OpenXR] pose validation failure; 2023-08-24 10:14:49.803 27370-27784 libc com.x.project A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 27784 (Thread-2), pid 27370 (arch.project) ---------------------------- PROCESS STARTED (27812) for package com.x.project ---------------------------- 2023-08-24 10:14:50.286 27810-27810 DEBUG pid-27810 A Cmdline: com.x.project 2023-08-24 10:14:50.286 27810-27810 DEBUG pid-27810 A pid: 27370, tid: 27784, name: Thread-2 >>> com.x.project

Источник: https://stackoverflow.com/questions/769 ... ndroid-app

Вернуться в «Android»