This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Noel Victor
committed
Aug 6, 2018
1 parent
a075e0b
commit cf95fd0
Showing
96 changed files
with
49,070 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+31.7 KB
libraries/sdk-commonwidget-1.150.0.aar → libraries/sdk-commonwidget-1.160.0.aar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+9.42 KB
libraries/sdk-controller-1.150.0.aar → libraries/sdk-controller-1.160.0.aar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# For more information about using CMake with Android Studio, read the | ||
# documentation: https://d.android.com/studio/projects/add-native-code.html | ||
|
||
cmake_minimum_required(VERSION 3.4.1) | ||
|
||
# Configure the sample code. | ||
file(GLOB native_srcs "src/main/jni/*.cc") | ||
add_library(hellovr_jni | ||
SHARED | ||
${native_srcs}) | ||
|
||
# Include the GVR headers & libraries. | ||
include_directories(${GVR_INCLUDE}) | ||
|
||
add_library(gvr-lib SHARED IMPORTED) | ||
set_target_properties( | ||
gvr-lib | ||
PROPERTIES IMPORTED_LOCATION ${GVR_LIBPATH}/${ANDROID_ABI}/libgvr.so) | ||
|
||
add_library(gvraudio-lib SHARED IMPORTED) | ||
set_target_properties( | ||
gvraudio-lib | ||
PROPERTIES IMPORTED_LOCATION ${GVR_LIBPATH}/${ANDROID_ABI}/libgvr_audio.so) | ||
|
||
# Include general Android libraries. | ||
find_library(android-lib android) | ||
find_library(EGL-lib EGL) | ||
find_library(GLESv2-lib GLESv2) | ||
find_library(log-lib log) | ||
|
||
# Build final libhellovr_jni.so | ||
target_link_libraries(hellovr_jni | ||
gvr-lib | ||
gvraudio-lib | ||
|
||
${android-lib} | ||
${EGL-lib} | ||
${GLESv2-lib} | ||
${log-lib} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright 2018 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 26 | ||
defaultConfig { | ||
applicationId "com.google.vr.ndk.samples.hellovr" | ||
minSdkVersion 19 | ||
targetSdkVersion 24 | ||
versionCode 1 | ||
versionName "1.0" | ||
externalNativeBuild { | ||
cmake { | ||
cppFlags "-std=gnu++11" | ||
arguments "-DGVR_LIBPATH=${project.rootDir}/libraries/jni", | ||
"-DGVR_INCLUDE=${project.rootDir}/libraries/headers" | ||
} | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled = true | ||
proguardFiles.add(file("${project.rootDir}/proguard-gvr.txt")) | ||
} | ||
} | ||
ndk { | ||
// This sample builds all architectures by default. Note that if you | ||
// only want to build for a specific architecture, you need to | ||
// remove the appropriate lines below. You also need to remove the | ||
// .so files from the apk using | ||
// "packagingOptions {exclude('lib/armeabi-v7a/*')}" in the android | ||
// section. | ||
abiFilters "arm64-v8a" | ||
abiFilters "armeabi-v7a" | ||
abiFilters "x86" | ||
} | ||
} | ||
externalNativeBuild { | ||
cmake { | ||
path "CMakeLists.txt" | ||
} | ||
} | ||
} | ||
|
||
|
||
dependencies { | ||
compile 'com.google.vr:sdk-audio:1.160.0' | ||
compile 'com.google.vr:sdk-base:1.160.0' | ||
} | ||
|
||
build.dependsOn(':extractNdk') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.google.vr.ndk.samples.hellovr" | ||
android:versionCode="180604046" | ||
android:versionName="1.160.0"> | ||
|
||
<!-- The GVR SDK requires API 19+ and OpenGL ES 2+. --> | ||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" /> | ||
<uses-feature android:glEsVersion="0x00020000" 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"/> | ||
|
||
<!-- 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"/> | ||
|
||
<!-- Indicates that head tracking should be done in 6DoF, if available --> | ||
<uses-feature | ||
android:name="android.hardware.vr.headtracking" | ||
android:version="1" | ||
android:required="false"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="HelloVrActivity" | ||
android:theme="@style/VrActivityTheme" | ||
android:icon="@drawable/ic_launcher_hello_vr_round"> | ||
<activity | ||
android:name=".HelloVrActivity" | ||
android:label="@string/app_name" | ||
android:screenOrientation="landscape" | ||
android:configChanges="orientation|keyboardHidden|screenSize|uiMode|navigation|density" | ||
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/hello_vr_icon_front" /> | ||
<meta-data android:name="com.google.android.vr.icon_background" | ||
android:resource="@drawable/hello_vr_icon_back" /> | ||
|
||
<!-- 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> | ||
</activity> | ||
</application> | ||
</manifest> |
Oops, something went wrong.