Skip to content

Commit

Permalink
Update AndroidManifest.xml and create MainActivity.java to launch demo
Browse files Browse the repository at this point in the history
Based on the MainActivity.java in: OpenXR-SDK-Source-release-1.0.13/src/tests/hello_xr/java/com/khronos/hello_xr

Following instructions from: https://gayanediriweera.github.io/code/2021/04/06/how-to-run-helloxr-on-oculus-quest.html
  • Loading branch information
daj committed Nov 18, 2021
1 parent cf95d3b commit 3104756
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SPDX-License-Identifier: Apache-2.0
<!-- If targeting API level 24+, configChanges should additionally include 'density'. -->
<!-- If targeting API level 24+, android:resizeableActivity="false" should be added. -->
<activity
android:name="com.khronos.hello_xr.MainActivity"
android:name="com.example.oculushelloxr.MainActivity"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:screenOrientation="landscape"
Expand All @@ -33,6 +33,7 @@ SPDX-License-Identifier: Apache-2.0
<!-- This filter lets the apk show up as a launchable icon. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.oculus.intent.category.VR" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/java/com/example/oculushelloxr/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2017-2020 The Khronos Group Inc
//
// SPDX-License-Identifier: Apache-2.0
package com.example.oculushelloxr;

public class MainActivity extends android.app.NativeActivity {
static {
// Note: Must handle loading of dependent shared libraries manually before
// the shared library that depends on them is loaded, since there is not
// currently a way to specify a shared library dependency for NativeActivity
// via the manifest meta-data.
System.loadLibrary("openxr_loader");
System.loadLibrary("hello_xr");
}
}

0 comments on commit 3104756

Please sign in to comment.