Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.
Yuya Matsuo edited this page Sep 9, 2016 · 23 revisions

How to use

Add dependency to build.gradle.

dependencies {
    compile 'org.meganekkovr:meganekko:3.0.1'
}

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="org.meganekkovr.sample.MyApp"/>

    <!-- Preferred configuration -->
    <activity
        android:name=".MainActivity"
        android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
        android:excludeFromRecents="true"
        android:label="@string/app_name"
        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>
Clone this wiki locally