AndroidManifest.xml 4.47 KB
Newer Older
1 2 3 4 5 6 7
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.vr.ndk.samples.treasurehunt"
    android:versionCode="170117123"
    android:versionName="1.20.0">

  <!-- The GVR SDK requires API 19+ and OpenGL ES 2+. -->
8 9
  <!--https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en-->
  <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  <uses-feature android:glEsVersion="0x00030000" android:required="true" />

  <!-- Required for vibration feedback when the trigger action is performed. -->
  <uses-permission android:name="android.permission.VIBRATE"/>
  <!-- Required to read the paired viewer's distortion parameters. -->
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.INTERNET" />

  <!-- Make accelerometer and gyroscope hard requirements for good head tracking. -->
  <uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
  <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>

  <!-- Indicates use of Android's VR-mode, available only on Android N+. -->
  <uses-feature android:name="android.software.vr.mode" android:required="false"/>
  <!-- Indicates use of VR features that are available only on Daydream-ready devices. -->
  <uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>

  <application
      android:allowBackup="true"
30
	android:icon="@drawable/ic_launcher"
31
      android:label="NOMADgvrT"
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
      android:theme="@style/VrActivityTheme">
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:screenOrientation="landscape"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:enableVrMode="@string/gvr_vr_mode_component"
        android:resizeableActivity="false">

      <!-- The VR icon to be used in Daydream Home comes in two parts:
           a foreground icon and a background icon.  -->
      <meta-data android:name="com.google.android.vr.icon"
                 android:resource="@drawable/vr_icon" />
      <meta-data android:name="com.google.android.vr.icon_background"
                 android:resource="@drawable/vr_icon_background" />

      <!-- Intent filter that enables this app to be launched from the
           Daydream Home menu. -->
      <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
          <category android:name="com.google.intent.category.DAYDREAM"/>
      </intent-filter>

      <!-- Intent filter that enables this app to be launched from the
           Cardboard app and from the traditional launcher. -->
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="com.google.intent.category.CARDBOARD" />
      </intent-filter>
			<!--Test opening a NOMAD url-->
64
			<intent-filter android:label="@string/app_name">
65 66 67
				<action android:name="android.intent.action.VIEW" />
				<category android:name="android.intent.category.DEFAULT" />
				<category android:name="android.intent.category.BROWSABLE" />
68
				<category android:name="android.intent.category.ALTERNATIVE" />
69
				<data android:scheme="file" />
70
				<data android:scheme="content" />
71 72 73 74
				<data android:mimeType="*/*" />
				<data android:pathPattern=".*\\.ncfg" />
				<data android:host="*" />
			</intent-filter>
75
			<intent-filter android:label="@string/app_name">
76 77 78 79 80 81
				<action android:name="android.intent.action.VIEW"/>
				<category android:name="android.intent.category.BROWSABLE"/>
				<category android:name="android.intent.category.DEFAULT"/>
				<data android:scheme="content" android:pathPattern=".*\\.ncfg" 
					  android:mimeType="application/octet-stream"/>
			</intent-filter>
82 83 84 85 86 87
			<intent-filter android:label="@string/app_name">
   				<action android:name="android.intent.action.SEND" />
				<category android:name="android.intent.category.DEFAULT" />
				<data android:scheme="content" android:pathPattern=".*\\.ncfg"  android:mimeType="*/*" />
			</intent-filter>
<!--http://stackoverflow.com/questions/3760276/android-intent-filter-associate-app-with-file-extension-->
88 89 90
    </activity>
  </application>
</manifest>