Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Remove unsupported platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Mar 17, 2020
1 parent bbf56d4 commit 38f5403
Show file tree
Hide file tree
Showing 26 changed files with 7 additions and 20,417 deletions.
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ git clone [email protected]:MozillaReality/FirefoxReality-android-third-party.git t
This repo is only available to Mozilla employees. If you have access to the relevant SDK but not this repo, you can manually place them here:

- `third_party/ovr_mobile/` for Oculus (should contain a `VrApi` folder)
- `third_party/svr/` for Snapdragon (should contain a `libs` folder, among other things)
- `third_party/wavesdk/` for Vive (should contain a `build` folder, among other things)

The [repo in `third_party`](https://github.com/MozillaReality/FirefoxReality-android-third-party) can be updated like so:
Expand All @@ -62,32 +61,18 @@ git submodule update --init --recursive
You can build for different devices:

- **`oculusvr`**: Samsung Gear VR & Oculus Go
- **`svr`**: Qualcomm & ODG glasses
- **`wavevr`**: VIVE Focus
- **`googlevr`**: Google Daydream

For testing on a non-VR device:

- **`noapi`**: Runs on standard Android phones without a headset

Building for Oculus Mobile, SVR, and WaveVR requires access to their respective SDKs which are not included in this repo.

*If you want to build FirefoxReality for Google Daydream (`googlevr`), you need to run:*

```bash
cd gvr-android-sdk && ./gradlew :extractNdk
```
Building for Oculus Mobile, and WaveVR requires access to their respective SDKs which are not included in this repo.

The command line version of `gradlew` requires [JDK 8 from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). If you see an error that Gradle doesn't understand your Java version, check which version of you're using by running `java -showversion` or `java -version`. You're probably using JDK 9 or 10, which won't work.

If you get an error extracting the NDK, you might need to copy the `local.properties file` from the top-level project directory into the `gvr-android-sdk` directory. If this file doesn't exist at the top-level directory either, open the top-level directory in Android Studio, and it should be created.

*Open the project with [Android Studio](https://developer.android.com/studio/index.html)* then build and run it. Depending on what you already have installed in Android Studio, the build may fail and then may prompt you to install dependencies. Just keep doing as it suggests. To select the device to build for, go to `Tool Windows > Build Variants` and select a build variant corresponding to your device.

If you run the APK on an Android device outside of Daydream or Gear VR, it will run in flat mode. To run in VR, put the device into a headset, and run the app from the VR launcher.

Unfortunately, for mobile-clip-in VR viewers, the APK isn't yet published in the Google Play Store because of [known performance issues and bugs](https://github.com/MozillaReality/FirefoxReality/issues/598). The APK currently available is for only standalone Daydream headsets.

*If you want to build FirefoxReality for WaveVR SDK:*

Download the [VIVE Wave SDK](https://developer.vive.com/resources/knowledgebase/wave-sdk/) from the [VIVE Developer Resources](https://vivedeveloper.com/), and unzip it. Then, from the top-level project directory, run:
Expand Down
2 changes: 0 additions & 2 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/build
/googlevr*
/googlevrFlat*
/oculusvr*
/noapi*
/svr*
Expand Down
23 changes: 0 additions & 23 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ target_sources(
src/wavevr/cpp/native-lib.cpp
src/wavevr/cpp/DeviceDelegateWaveVR.cpp
)
elseif(GOOGLEVR)
target_sources(
native-lib
PUBLIC
src/googlevr/cpp/native-lib.cpp
src/googlevr/cpp/DeviceDelegateGoogleVR.cpp
)
elseif(PICOVR)
target_sources(
native-lib
Expand Down Expand Up @@ -110,14 +103,6 @@ add_custom_command(TARGET native-lib POST_BUILD
)
endif()

if(SNAPDRAGONVR)
target_sources(
native-lib
PUBLIC
src/svr/cpp/DeviceDelegateSVR.cpp
)
endif()

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
Expand All @@ -140,14 +125,6 @@ add_library(ovrplatform-lib SHARED IMPORTED)
set_target_properties(ovrplatform-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/OVRPlatformSDK/Android/libs/${ANDROID_ABI}/libovrplatformloader.so )

add_library(googlevr-lib SHARED IMPORTED)
set_target_properties(googlevr-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../gvr-android-sdk/libraries/jni/${ANDROID_ABI}/libgvr.so)

add_library(svr-lib SHARED IMPORTED)
set_target_properties(svr-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/svr/libs/${ANDROID_ABI}/libsvrapi.so )

add_library(wavevr-lib SHARED IMPORTED)
set_target_properties(wavevr-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/wavesdk/build/wvr_client/jni/${ANDROID_ABI}/libwvr_api.so )
Expand Down
98 changes: 0 additions & 98 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,10 @@ android {
disable "ExtraTranslation"
}

packagingOptions {
pickFirst '/lib/*/libgvr.so'
}

flavorDimensions "platform", "abi"

productFlavors {
// Supported platforms
googlevr {
dimension "platform"
externalNativeBuild {
cmake {
cppFlags " -I" + file("${project.rootDir}/gvr-android-sdk/libraries/headers").absolutePath +
" -DVRBROWSER_GOOGLEVR"
arguments "-DVR_SDK_LIB=googlevr-lib", "-DGOOGLEVR=ON"
}
}
}

oculusvr {
dimension "platform"
externalNativeBuild {
Expand Down Expand Up @@ -171,18 +156,6 @@ android {
manifestPlaceholders = [ headtrackingRequired:"false", permissionToRemove:"android.permission.CAMERA" ]
}

svr {
dimension "platform"
externalNativeBuild {
cmake {
cppFlags " -I" + file("${project.rootDir}/third_party/svr/public").absolutePath +
" -I" + file("${project.rootDir}/app/src/svr/cpp").absolutePath +
" -DSNAPDRAGONVR"
arguments "-DVR_SDK_LIB=svr-lib", "-DSNAPDRAGONVR=ON"
}
}
}

wavevr {
minSdkVersion build_versions.min_sdk_wave
dimension "platform"
Expand Down Expand Up @@ -229,13 +202,6 @@ android {
}

// Supported ABIs
arm {
dimension "abi"
ndk {
abiFilters "armeabi-v7a"
}
}

arm64 {
dimension "abi"
ndk {
Expand All @@ -253,38 +219,18 @@ android {

variantFilter { variant ->
def needed = variant.name in [
'googlevrArmDebug',
'googlevrArmRelease',
'googlevrArm64Debug',
'googlevrArm64Release',
'oculusvrArmDebug',
'oculusvrArmRelease',
'oculusvrArm64Debug',
'oculusvrArm64Release',
'oculusvrStoreArmDebug',
'oculusvrStoreArmRelease',
'oculusvrStoreArm64Debug',
'oculusvrStoreArm64Release',
'oculusvr3dofStoreArmDebug',
'oculusvr3dofStoreArmRelease',
'oculusvr3dofStoreArm64Debug',
'oculusvr3dofStoreArm64Release',
'svrArmDebug',
'svrArmRelease',
'svrArm64Debug',
'svrArm64Release',
'picovrArm64Debug',
'picovrArm64Release',
'wavevrArmDebug',
'wavevrArmRelease',
'wavevrArm64Debug',
'wavevrArm64Release',
'wavevrStoreArmDebug',
'wavevrStoreArmRelease',
'wavevrStoreArm64Debug',
'wavevrStoreArm64Release',
'noapiArmDebug',
'noapiArmRelease',
'noapiArm64Debug',
'noapiArm64Release',
'noapiX86_64Debug',
Expand All @@ -309,12 +255,6 @@ android {

}

googlevr {
java.srcDirs = [
'src/googlevr/java'
]
}

oculusvr {
java.srcDirs = [
'src/oculusvr/java'
Expand All @@ -339,11 +279,6 @@ android {
]
}

oculusvrArmRelease {
manifest.srcFile getUseDebugSigningOnRelease() ? "src/oculusvrArmDebug/AndroidManifest.xml"
: manifest.srcFile
}

oculusvrArm64Debug {
manifest.srcFile "src/oculusvrArmDebug/AndroidManifest.xml"
}
Expand All @@ -353,49 +288,24 @@ android {
: "src/oculusvrArmRelease/AndroidManifest.xml"
}

oculusvrStoreArmDebug {
manifest.srcFile "src/oculusvrArmDebug/AndroidManifest.xml"
}

oculusvrStoreArm64Debug {
manifest.srcFile "src/oculusvrArmDebug/AndroidManifest.xml"
}

oculusvrStoreArmRelease {
manifest.srcFile getUseDebugSigningOnRelease() ? "src/oculusvrArmDebug/AndroidManifest.xml"
: "src/oculusvrArmRelease/AndroidManifest.xml"
}

oculusvrStoreArm64Release {
manifest.srcFile getUseDebugSigningOnRelease() ? "src/oculusvrArmDebug/AndroidManifest.xml"
: "src/oculusvrArmRelease/AndroidManifest.xml"
}

oculusvr3dofStoreArmDebug {
manifest.srcFile "src/oculusvrArmDebug/AndroidManifest.xml"
}

oculusvr3dofStoreArm64Debug {
manifest.srcFile "src/oculusvrArmDebug/AndroidManifest.xml"
}

oculusvr3dofStoreArmRelease {
manifest.srcFile getUseDebugSigningOnRelease() ? "src/oculusvrArmDebug/AndroidManifest.xml"
: "src/oculusvrArmRelease/AndroidManifest.xml"
}

oculusvr3dofStoreArm64Release {
manifest.srcFile getUseDebugSigningOnRelease() ? "src/oculusvrArmDebug/AndroidManifest.xml"
: "src/oculusvrArmRelease/AndroidManifest.xml"
}

svr {
java.srcDirs = [
'src/svr/java'
]
jniLibs.srcDirs = ["${project.rootDir}/third_party/svr/libs"]
}

wavevr {
java.srcDirs = [
'src/wavevr/java'
Expand Down Expand Up @@ -456,7 +366,6 @@ dependencies {
implementation deps.openwnn

// Common
// implementation deps.google_vr.sdk_audio
implementation deps.lifecycle.runtime
implementation deps.lifecycle.extensions
implementation deps.support.cardview
Expand Down Expand Up @@ -515,20 +424,13 @@ dependencies {
testImplementation deps.telemetry.glean_unittests
testImplementation deps.work.testing

// Daydream
googlevrImplementation deps.google_vr.sdk_base

// ODG
svrImplementation fileTree(dir: "${project.rootDir}/third_party/svr/", include: ['*.jar'])

// Pico
picovrImplementation fileTree(dir: "${project.rootDir}/third_party/picovr/", include: ['*.jar'])
}

if (findProject(':servo')) {
dependencies {
oculusvrImplementation project(':servo')
googlevrImplementation project(':servo')
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ distribution:
lifetime: application
description: >
The distribution channel name of this application. We use this field to recognize Firefox Reality
is distributed to which channels, such as wavevr, oculusvr, googlevr, etc.
is distributed to which channels, such as wavevr, oculusvr, etc.
send_in_pings:
- baseline
- events
Expand Down
12 changes: 0 additions & 12 deletions app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -707,18 +707,6 @@ public boolean dispatchKeyEvent(KeyEvent event) {
}
return result || super.dispatchKeyEvent(event);

} else if (DeviceType.isGoogleVR()) {
boolean result;
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
result = true;
break;
default:
result = super.dispatchKeyEvent(event);
break;
}
return result;
}
return super.dispatchKeyEvent(event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ public static boolean isWaveBuild() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("wavevr");
}

public static boolean isGoogleVR() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("googlevr");
}

public static boolean isPicoVR() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("picovr");
}
Expand Down
36 changes: 0 additions & 36 deletions app/src/googlevr/AndroidManifest.xml

This file was deleted.

14 changes: 0 additions & 14 deletions app/src/googlevr/assets/vr_controller_daydream.mtl

This file was deleted.

Loading

0 comments on commit 38f5403

Please sign in to comment.