Skip to content

Commit

Permalink
Update Code Samples
Browse files Browse the repository at this point in the history
  • Loading branch information
dthian committed Aug 20, 2020
1 parent f3f3833 commit 3701e16
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 4 additions & 2 deletions android/app/src/main/cpp/VROSceneRendererOVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ typedef void(GL_APIENTRY* PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC)(
static const int CPU_LEVEL = 2;
static const int GPU_LEVEL = 3;
static const int NUM_MULTI_SAMPLES = 4;
const unsigned int ControllerRightId = 536870914;
const unsigned int ControllerLeftId = 536870915;
const uint32_t ControllerRightId = 536870914;
const uint32_t ControllerLeftId = 536870915;
/*
================================================================================
Expand Down Expand Up @@ -1023,6 +1023,8 @@ static void ovrApp_HandleInput(ovrApp* app, double predictedDisplayTime,
snapShot.deviceID = ViroOculusInputEvent::ControllerRightId;
} else if (ControllerLeftId == cap.DeviceID) {
snapShot.deviceID = ViroOculusInputEvent::ControllerLeftId;
} else {
return;
}
snapShot.batteryPercentage = trackedRemoteState.BatteryPercentRemaining;

Expand Down
10 changes: 5 additions & 5 deletions code-samples/virocore-helloworld-vr/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
compileSdkVersion 28
defaultConfig {
applicationId "com.example.virosample"
minSdkVersion 21
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "x86", "armeabi", "mips"
abiFilters "arm64-v8a"
}
}
buildTypes {
Expand All @@ -32,8 +32,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:25.0.0'
implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.exoplayer:exoplayer:2.7.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@

<!-- Required to read the paired viewer's distortion parameters -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />

<!-- Required for Recording -->
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature
android:name="android.hardware.vr.headtracking"
android:version="1"
android:required="true"
/>

<application
android:allowBackup="true"
Expand Down

0 comments on commit 3701e16

Please sign in to comment.