Code Monkey home page Code Monkey logo

firefoxreality's Introduction

Firefox Reality

The goal of the Firefox Reality project is to create a full-featured browser exclusively for standalone AR and VR headsets.

You can find us in #fxr:mozilla.org on the Matrix (Instructions for joining), Twitter @MozillaReality, and at [email protected].

Download developer APKs

Download developer APKs for Firefox Reality generated from latest main.

Locale support

Firefox Reality supports Chinese (China), Chinese (Taiwan), English, French, German, Italian, Japanese, Russian, and Spanish for user interface, voice search, and text entry. Localization is provided by Mozilla's amazing community of volunteer localizers.

For more info on localization, how it works in the Firefox Reality project, and how to correctly edit localizable text in the application, please see the localization wiki page.

Setup instructions

Clone FirefoxReality.

git clone [email protected]:MozillaReality/FirefoxReality.git
cd FirefoxReality

Clone the third-party repo.

If you're developing for the Oculus, Snapdragon VR, or VIVE, you need to clone the repo with third-party SDK files.

git clone [email protected]:MozillaReality/FirefoxReality-android-third-party.git third_party

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/wavesdk/ for Vive (should contain a build folder, among other things)

The repo in third_party can be updated like so:

pushd third_party && git fetch && git checkout main && git rebase origin/main && popd

Fetch Git submodules.

You may need to set up two-factor authentication for the command line.

git submodule update --init --recursive

You can build for different devices:

  • oculusvr: Samsung Gear VR & Oculus Go
  • wavevr: VIVE Focus

For testing on a non-VR device:

  • noapi: Runs on standard Android phones without a headset

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. 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.

Open the project with Android Studio 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 want to build FirefoxReality for WaveVR SDK:

Download the VIVE Wave SDK from the VIVE Developer Resources, and unzip it. Then, from the top-level project directory, run:

mkdir -p third_party/wavesdk
cp /path/to/the/sdk/2.0.32/SDK/libs/wvr_client.aar third_party/wavesdk
cp ./extra/wavesdk/build.gradle ./third_party/wavesdk

Make certain to set the build flavor to wavevrDebug in Android Studio before building the project.

Local Development

Dependency substitutions

You might be interested in building this project against local versions of some of the dependencies. This could be done either by using a local maven repository (quite cumbersome), or via Gradle's dependency substitutions (not at all cumbersome!).

Currently, the substitution flow is streamlined for some of the core dependencies via configuration flags in local.properties. You can build against a local checkout of the following dependencies by specifying their local paths:

  • GeckoView, specifying its path via dependencySubstitutions.geckoviewTopsrcdir=/path/to/mozilla-central (and, optionally, dependencySubstitutions.geckoviewTopobjdir=/path/to/topobjdir). See Bug 1533465.
    • This assumes that you have built, packaged, and published your local GeckoView -- but don't worry, the dependency substitution script has the latest instructions for doing that.

Do not forget to run a Gradle sync in Android Studio after changing local.properties. If you specified any substitutions, they will be reflected in the modules list, and you'll be able to modify them from a single Android Studio window.

Install dev and production builds on device simultaneously

You can enable a dev applicationID sufix to install both dev and production builds simultaneously. You just need to add this property to your user.properties file:

simultaneousDevProduction=true

Locally generate Android release builds

Local release builds can be useful to measure performance or debug issues only happening in release builds. Insead of dealing with release keys you can make the testing easier just adding this property to your user.properties file:

useDebugSigningOnRelease=true

Note: the release APKs generated with a debug keystore can't be used for production.

Compress assets

ETC2 compression is used to improve performance and memory usage. Raw assets are placed in the uncompressed_assets folder. You can generate the compressed textures using the compressor utility in tools/compressor. You need to set up etc2comp and make it available on your PATH before running the script. Run this command to generate the compressed assets:

cd tools/compressor
npm install
npm run compress

Enable OpenXR builds

You can enable OpenXR API for Oculus by adding this property to your user.properties file:

openxr=true

Development troubleshooting

Device supports , but APK only supports armeabi-v7a[...]

Enable USB Remote Debugging on the device.

Firefox > Web Developer > WebIDE > Performance gets stuck with greyed out "stop and show profile"

Restart FxR and close and re-open the WebIDE page.

Tool Windows > Build Variants list is empty

  1. If you're not on the latest version, update Android Studio from Android Studio > Check for Updates….
  2. Run File > Sync Project with Gradle Files.

Debugging tips

  • When using the native debugger you can ignore the first SIGSEGV: address access protected stop in GV thread. It's not a crash; you can click Resume to continue debugging.
  • On some platforms such as Oculus Go the native debugger stops on each input event. You can set this LLDB post-attach command in Android Studio to fix the problem: pro hand -p true -s false SIGILL
  • You can use adb shell am start -a android.intent.action.VIEW -d "https://aframe.io" org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity to load a URL from the command line
  • You can use adb shell am start -a android.intent.action.VIEW -n org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity -e homepage "https://example.com" to override the homepage
  • You can use adb shell setprop debug.oculus.enableVideoCapture 1 to record a video on the Oculus Go. Remember to run adb shell setprop debug.oculus.enableVideoCapture 0 to stop recording the video.
    • You can also record videos on the Oculus Go by exiting to the system library, and from the Oculus tray menu (toggle with the Oculus button on the controller): Sharing > Record Video
  • You can set disableCrashRestart=true in the gradle user.properties to disable app relaunch on crash.

Experimental Servo support

To compile with Servo support, create a file called user.properties in the top-level project directory and add enableServo=1. Then to enable Servo in Firefox Reality, go the Developer Options panel in the Settings, and toggle the Servo option. Then a new button will be added to the navigation bar. Clicking that button will reload the current page with Servo.

firefoxreality's People

Contributors

agi avatar andrenatal avatar badboy avatar bluemarvin avatar callek avatar caseyyee avatar cvan avatar daoshengmu avatar daron-walters avatar djmitche avatar ferjm avatar grigoryk avatar jvonitter avatar kdashg avatar kearwood avatar keianhzo avatar manishearth avatar mdboom avatar mortimergoro avatar mozilla-l10n-automation-bot avatar mstange avatar nancyhang avatar ncalexan avatar owlishdeveloper avatar paulrouget avatar philip-lamb avatar pike avatar pocmo avatar rangermauve avatar snorp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firefoxreality's Issues

URL bar hover

Set the right hover styles and text selection colors for the URL bar

Error with build - Wave VR

I want to install the build on HTC Focus but I meet some errors when I built irt with Android Studio.
First the function onCrash() must be override in three classes in the project but it was easy to fix.
My main problem was with an error relative to the compilator I think. The error file is joined here.
I was really enthusiastic to use this app and I'm a beginner in android development so I hope it's an obvious beginner error.
ErrorBuildAndroidFocus.txt

How to switch to VR on Daydream?

I feel stupid asking this, but after installing the released .apk on my Daydream compatible device I can use FirefoxReality fine as a mobile browser, but there seems to be no way to actually switch into VR mode?

Does it only work with the Daydream headset NFC tag? I am using a third party headset that doesn't come with this NFC tag, but all other Daydream apps can be switched to VR manually.

Improve the remote controller pointer and laser

The remote controller pointer is very big when the widgets are close to the user. Currently we are hiding the pointer for the keyboard because of that.

Ideally we can adjust the scale to make the pointer the same size on any widget. We also can check for alternative designs (sphere?)

Fade effect gets out of sync

STR:

  1. Go into private browsing mode (fade effect enabled)
  2. Go into focus mode (fade effect enabled again [note there is a flash, probably shouldn't happen])
  3. Go out of private browsing mode

Expect result: Fade effect remains.
Actual result: Fade effect is turned off.

Error running on pixel 2

I followed the instructions and built the project successfully, but when tried to run on my pixel 2, got the error: Device supports, but APK only supports armeavi-v7a

New UI

Start the new UI integration:

  • Better window & widget sizes, placements, etc
  • Single-window UI design (without carousel)
  • New URL bar design
  • Organize all the placement sizes & dimensions in a Android Resource file to make it easy to change

GV preferences not applied on first launch

e.g: Enabling WebVR preference and loading the WebVR sample gets the "page says WebVR found but no displays available." on the first launch.
On next launches it runs ok.

Keyboard popup for special keys

We need to create a popup to be able to type some keybord characters that aren't in the default querty layout

e.g. Possible flow to write á' would be to:

  • Press and hold the normal a key
  • After some threshold the keyboard shows a popup on top of the letter with all the possible variations for the selected letter (e.g. áăäâ)
  • Selected the variation or close the pop up

Better widgets API

We need to improve the widgets API to create all the windows, widgets and placements from Java:

  • Create & place all widgets from Java
  • Generate ids from java in order to avoid having to wait the callback with the C++ handler
  • Remove the widget creation enumerations
  • Consider moving visibility to WidgetPlacement class
  • Adapt all widget children to the new API

Stack the links opened in "new tab"

On the old UI links with "target=_blank" opened a new tab. On the new UI, until the carrousel is ready, we need to stack the new link in the current session instead of setting a different session

Set a better URL for home

The URL of the home page is a long URL (resource://......). It's not pretty for a product. Keep the URL bar empty or find a better text

The same for error pages.

Keyboard backspace above the enter key

Some people tried the browser in the off-site and one of the comments about the keyboard was that the backspace position was confusing. People are used to have it above the enter key.

Full-screen mode

  • Implement full-screen mode
  • Enabled from chrome UI or from a JavaScript call
  • Exit from full-screen mode

Hover colors: ease in/out

Browser window: ease the colors in and out to make it look a bit smoother than just abrupt color change

Add back handlers for more widgets

FxR has a new back handler API for widgets. It's currently implemented for focus and full screen modes.

We should implement that too for settings and permission prompt dialogs

Improve URL detection on the URLBar

CXB-22 Currently you need to add the protocol to detect a URL, and it does a google search if you don't add it.

Check what other browsers do in order to detect when to automatically load a URL instead of a search.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.