This repository has been archived by the owner on Dec 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Yuya Matsuo edited this page Nov 21, 2016
·
23 revisions
Meganekko is an open-source Gear VR application framework for creating virtual reality (VR) experiences with standard Android development skills. Example:
<scene>
<view src="@layout/view" position="0 0 -10"/>
</scene>
and
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!!"/>
Add dependency to build.gradle.
dependencies {
compile 'org.meganekkovr:meganekko:3.0.+'
}
Add some attributes to AndroidManifest.xml
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<!-- You have to declare this meta data to notify to system to launch Gear VR screen -->
<meta-data
android:name="com.samsung.android.vr.application.mode"
android:value="vr_only" />
<!-- Declare your App class extends MeganekkoApp -->
<meta-data
android:name="org.meganekkovr.App"
android:value="com.your.company.App"/>
<!-- Preferred configuration -->
<activity
android:name="org.meganekkovr.GearVRActivity"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
android:excludeFromRecents="true"
android:launchMode="singleTask"
android:screenOrientation="landscape">
<!-- This intent filter should be removed when submit to Oculus Store -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
These documents in Oculus official website are useful in using Meganekko.