-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Research] Generate Oculus Store compatible APKs #615
Comments
On 1, if someone can share an APK generated by the Oculus CLI I'm happy to check it out. |
Hmm, for some reason I have no @jacobrossi PTAL. |
the cli is https://developer.oculus.com/documentation/web/pwa-packaging/#download-the-cli |
Here's APK: https://drive.google.com/file/d/1IAw8M0kc695GiawnBAvijfqzohrWHPbJ I'm almost 100% sure it's not a TWA. :) And here it's <?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
android:compileSdkVersion="23"
android:compileSdkVersionCodename="6.0-2438415"
package="com.airhorner"
platformBuildVersionCode="29"
platformBuildVersionName="10">
<uses-sdk
android:minSdkVersion="23"
android:targetSdkVersion="29" />
<uses-feature
android:name="android.hardware.vr.headtracking"
android:required="false"
android:version="1" />
<uses-feature
android:name="oculus.software.handtracking"
android:required="false" />
<uses-permission
android:name="com.oculus.permission.HAND_TRACKING" />
<application
android:theme="@ref/0x7f0d0005"
android:label="The Air Horner"
android:icon="@ref/0x7f0b0000"
android:debuggable="false"
android:allowBackup="false"
android:supportsRtl="true"
android:extractNativeLibs="false"
android:roundIcon="@ref/0x7f0b0001"
android:appComponentFactory="androidx.core.app.CoreComponentFactory">
<meta-data
android:name="web_manifest_url"
android:value="https://airhorner.com/manifest.json" />
<meta-data
android:name="com.oculus.pwa.START_URL"
android:value="https://airhorner.com/?homescreen=1" />
<meta-data
android:name="com.oculus.pwa.SCOPE"
android:value="https://airhorner.com/" />
<meta-data
android:name="com.oculus.pwa.NAME"
android:value="The Air Horner" />
<meta-data
android:name="com.oculus.pwa.APPID"
android:value="@string/0x15" />
<meta-data
android:name="com.oculus.vrshell.supports_free_resizing"
android:value="true"
maxSizeX="1280"
maxSizeY="1000"
minSizeX="400"
minSizeY="400" />
<meta-data
android:name="com.oculus.pwa.SHORT_NAME"
android:value="Airhorner" />
<meta-data
android:name="com.oculus.pwa.DESCRIPTION"
android:value="The world's best airhorner, and it's free" />
<meta-data
android:name="com.oculus.pwa.ICONS"
android:value="[{"src":"/images/touch/android-launchericon-48-48.png","type":"image/png","sizes":"48x48"},{"src":"/images/touch/android-launchericon-72-72.png","type":"image/png","sizes":"72x72"},{"src":"/images/touch/android-launchericon-96-96.png","type":"image/png","sizes":"96x96"},{"src":"/images/touch/android-launchericon-144-144.png","type":"image/png","sizes":"144x144"},{"src":"/images/touch/android-launchericon-192-192.png","type":"image/png","sizes":"192x192"},{"src":"/images/touch/android-launchericon-512-512.png","type":"image/png","sizes":"512x512"},{"src":"/images/touch/android-maskableicon-48-48.png","type":"image/png","sizes":"48x48","purpose":"maskable"},{"src":"/images/touch/android-maskableicon-72-72.png","type":"image/png","sizes":"72x72","purpose":"maskable"},{"src":"/images/touch/android-maskableicon-96-96.png","type":"image/png","sizes":"96x96","purpose":"maskable"},{"src":"/images/touch/android-maskableicon-144-144.png","type":"image/png","sizes":"144x144","purpose":"maskable"},{"src":"/images/touch/android-maskableicon-192-192.png","type":"image/png","sizes":"192x192","purpose":"maskable"},{"src":"/images/touch/android-maskableicon-512-512.png","type":"image/png","sizes":"512x512","purpose":"maskable"}]" />
<meta-data
android:name="com.oculus.pwa.SCREENSHOTS"
android:value="[{"src":"/images/screenshots/1-360x640.png","type":"image/png","sizes":"1080x1920"},{"src":"/images/screenshots/2-360x640.png","type":"image/png","sizes":"360x640"}]" />
<meta-data
android:name="com.oculus.pwa.DISPLAY"
android:value="standalone" />
<meta-data
android:name="com.oculus.pwa.BACKGROUND_COLOR"
android:value="rgb8(0xff2196f3)" />
<meta-data
android:name="com.oculus.pwa.THEME_COLOR"
android:value="rgb8(0xff2196f3)" />
</application>
</manifest> I've tried to run it in Android emulator and got the following error:
|
Interesting - despite being ~1mb in side, the Android Manifest doesn't have any Activity and neither does the code in Overall, their approach seems to be similar to how Trusted Web Activity works on Chrome OS on some scenarios - when the application is installed, Chrome OS reads the APK and extracts the information shipped within the app to generate an installed PWA - Bubblewrap ships a copy of the Web Manifest inside the APK. |
@davehill00 @jacobrossi @cabanier FYI. 😉 BTW, @jacobrossi @cabanier Does Oculus Browser supports TWA (Trusted Web Activity)? |
Anyone made any progress - any examples walkthroughs? |
I'm still working on it. The problem is I don't have my own Oculus device. So I ask my friend who has the device to check some things for me. Along the way, I check what PWA features on Oculus works and what doesn't. See immersive-web/webxr-samples#135. 😉 That's why it's so slow. :) |
If you need another device I have Quest2 I can test with for you. |
|
Good news! I finally own Quest 2. 😊 ICYMI, preview version of PWABuilder (https://preview.pwabuilder.com) offers packaging PWA for Oculus Store. 😉 @tomayac cc. It uses |
I've also checked TWA on Quest 2. I've sideloaded APK via ADB and opened it via "Unknown Sources" section. And it just opened in Oculus Browser just like regular website (not in standalone mode). I've also sideloaded Google Chrome APK to Quest 2. :) If Chrome is installed, then TWA open in it in standalone mode (instead of Oculus Browser). |
Oh, thanks for sharing, @FluorescentHallucinogen. That's really a nice feature addition to PWABuilder! |
For anyone who's interested: Packaging PWAs for Quest with PWABuilder is officially released in stable channel: https://twitter.com/pwabuilder/status/1529191206919491586. It's the recommended way to package PWAs for Quest: https://developer.oculus.com/documentation/web/pwa-building-with-pwabuilder/. So I've updated @tomayac's “PWAs on Oculus Quest 2” blog post: https://web.dev/pwas-on-oculus-2/. I've reduced the size of The I've finally got my hands on working on pull request that adds to Bubblewrap a flag for generating universal APKs compatible with Quest that open Trusted Web Activity (TWA) on regular Android devices and open Meta Quest Browser on Quest devices. This will allow to abandon |
See #704. 😉 |
Initial request
https://twitter.com/ThePra9/status/1455899334365618181
Current plan
1.1. Generate APK using Oculus CLI:
Or to use local manifest file:
Check if Oculus supports TWA (Trusted Web Activity):
2.1. Generate APK using Bubblewrap (PWABuilder), try to publish it to Oculus Store via Oculus CLI or web interface (see https://developer.oculus.com/resources/publish-reference-platform-command-line-utility/#upload-quest) and make some changes to APK source code to fix errors/warnings (see https://developer.oculus.com/resources/publish-mobile-manifest/#specs).
2.2. Compare APK generated by Oculus CLI with APK generated by Bubblewrap (
AndroidManifest.xml
, etc.).2.3. Check APK with fixes published to Oculus Store on real Oculus device.
Create a pull request for Bubblewrap.
Create a pull request for PWABuilder.
Write docs. E.g. document new vendor-specific proprietary web app manifest members such as:
and
Notes
This should be an option to not affect APKs for other app stores.
The text was updated successfully, but these errors were encountered: