Using the Dive Tag


1) If you don't have an Android Manifest file (AndroidManifest.xml) in your PROJECT_DIR\Assets\Plugins\Android folder, get yourself one:

1a) Make sure your app is targeted to Android.

1b) Build your App.

1c) Copy the auto-generated manifest file AndroidManifest.xml from PROJECT_DIR\Temp\StagingArea to PROJECT_DIR\Assets\Plugins\Android.

2) Edit AndroidManifest.xml to add a meta-data tag in the application tag like so:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sample.app" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
	<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
	<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
		<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
			<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
		</activity>
		<meta-data android:name="com.durovis.dive.uses" android:value="true" />
</application> <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" /> <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen" /> <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" /> </manifest>

3) Your app will now appear in the Dive Launcher