Google Photos viewer for Meta Quest.
- View flat and 360° photos and videos from Google Photos
- Your photos data never leaves your device
- 100% open source
Learn more at gallery.yoonicode.com • Made by Eric Yoon • Contributions welcome—see LICENSE
- Download the SideQuest desktop app and configure your Meta Quest by following this guide.
- Get the latest app on SideQuest.
- Make sure you have the
adb
command line tool installed. (Installation guide) - Make sure your Meta Quest is in developer mode. (Guide)
- Download the latest APK from the Releases tab.
- Plug in your Quest to your computer. Accept the prompt on your Quest.
- In a new shell, type
adb devices
and verify your Quest is listed. Typeadb install path/to/file.apk
. - Your app is installed under Unknown Sources in your Quest.
npm install -g serve
- Create a project in the Google Cloud Console
- Under the API Library, enable the Google Photos Picker library
- Configure your OAuth Consent Screen
- Authorize the domain
yoonicode.com
- Add the scope
https://www.googleapis.com/auth/photospicker.mediaitems.readonly
- Authorize the domain
- Under the Credentials page, create a new credential
- Type: OAuth Client ID
- Application type: Web application
- Add the Javascript origins "https://gallery.yoonicode.com" and "http://localhost:1234"
- Take note of your client ID and client secret
- Add Firebase to your Google Cloud project
- Create a new Web client
- Take note of the Firebase config shown to you
cd OculusGooglePhotos-Web
- Copy
config.template.js
toconfig.js
- Paste in your Google client ID
- Paste in your Firebase Config JSON object
npm install
npm start
cd OculusGooglePhotos-Web/functions
- Copy
config.template.js
toconfig.js
- Paste in your Google client ID and client secret
npm run deploy
, or to emulate locally,npm run serve
- If you plan on using the emulator, you need to set up your admin credentials locally. See docs. Download your key as
serviceAccountKey.json
and place it in thefunctions
directory.
- If you plan on using the emulator, you need to set up your admin credentials locally. See docs. Download your key as
- Follow this guide to get your Meta Quest set up with Unity.
- Copy
OculusGooglePhotos-Unity/Assets/Scripts/Constants.template
toConstants.cs
- Paste in your Cloud Functions base URL (such as
https://us-central1-foobar.cloudfunctions.net
)
- Paste in your Cloud Functions base URL (such as
Known problem: There seems to be a bug with Unity where OpenXR settings are reset every time assets are imported.
- Add "Meta Quest Touch Controller Plus" and "Meta Quest Touch Controller Pro" to
Enabled interaction profiles
.- Enable "Meta Quest Support" under Feature Groups
- Go to
Project Settings
->OpenXR
->Meta Quest Support
(cog wheel) -> deselectForce Remove Internet
.
- Tip: use
apktool d my-build.apk && cat my-build/AndroidManifest.xml | grep "INTERNET"
to quickly check.
- User is prompted visit the companion website and enter a code.
- Website redirects user to Google login page
- Once authorized, Google redirects user back to companion website with a query parameter of the auth code
- Companion website trades authorization code for refresh token
- Companion website prompts user to open a new tab, where they can select photos
- Companion website polls for the photos picker result
- Companion website calls a Firebase Cloud Function, saving the refresh token and picker session ID in the database, paired with the code the user entered
- Unity scene polls a Firebase Function every 5 seconds given its generated code, Firebase Function returns the refresh token and session ID
- Unity trades in the refresh token for an access token whenever it expires