Git Product home page Git Product logo

unityoculusandroidvrbrowser's People

Contributors

callumferguson avatar ianphilips avatar robertncoomber avatar sienori 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

unityoculusandroidvrbrowser's Issues

Export plugin to a different Unity editor

Hello,
fantastic and very useful work, thank you.
I just have one question, is it possible to export the plugin to a different version of Unity than the project creation version (2022.3.4f1)?
I created the apk in the original project and it works perfectly on Meta Quest 2, but I would need it on a more updated editor. I made a couple of attempts but couldn't get it to work:

  1. I exported the components of the original project to a new editor via UnityPackage, but the plugin doesn't work ( after building you can see the web window but it remains black, maybe I missed some setup)
  2. I updated the editor on which you had set the working scene to my editor (it makes me build, creates the apk, but as soon as I try to start the application from viewer it crashes).

I would need it for a university work project, would you be able to give me some tips on how to get your plugin working?
Thanks :)

Donation Link?

Hey, this isn't really too related to this project, but do you have a donation link? This is exactly what I've been looking for, and I seriously want to thank you for doing the hard work for me! :)

Drag & Drop in Oculus Quest 2

demo.mp4

Hello everyone,

I can load a webpage onto the Oculus Quest 2 and use it with the controller (without moving the head). Also, I can use the controller buttons to select the interactable buttons within the webpage.

However, drag & drop does not work and only clicks work (even though not always). Does d&d work to anyone and how to get it working?

I attach a video to show that clicks work while d&d does not via the controller buttons.

Thanks!

Render web VR content

Hi, Great job!!

I cannot view Webvr html page, ex. aframe.io
Is there a way? maybe with:
import org.mozilla.geckoview.GeckoVRManager;

Unable to open the plugin in Android Studio: gradle fails

Hey there,

I am trying to open and build the plugin in Android Studio, however I am always getting this error which prevents me from building the project.

A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

Any idea how to fix it?

Problem building plugin with newer GeckoView Version

Hello everyone,

When bulding the GeckoView plugin with the newest version ("95.0.20211129150630"), several errors occur and it is no longer possible to build the plugin.
The erros are:
grafik

Any help in solving them would be much appreciated!

P.S.: My plan ist to get the plugin running with the newest version of gecko und eventually on arm64.

Contact details for VR collaboration

I see in your readme that you are currently not working on VR. Would you be interested in a VR development position? I cannot find your contact details. Could you contact me so we can continue this conversation?

Best regards,
Juan

Crash after Unity logo in Oculus Quest

Short description

I want to run the OverlayBrowserDemo on Oculus Quest 2.
But the app crashes after the Unity logo is displayed.

Steps to reproduce

  1. Clone this repository and open the UnityProject in Unity
  2. Set Build Settings > Platform to Android
  3. Set Build Settings > Texture Compression to ASTC
  4. Click Switch Platform
  5. Uncheck Player Settings > Player > Other Settings > Auto Graphics API
  6. Check Project Settings > XR Plug-in Management > Plug-in Providers > Oculus
  7. Add Scenes/OverlayBrowserDemo to Build Settings > Scenes In Build
  8. Install Android Logcat in Package Manager (To see Quest's log)
  9. Build And Run

Expected result

The app launches in the Quest and I'll be able to see the browser.

Actual result

The app crashes and exits after the Unity logo is displayed.
Logcat shows the error log: log.txt

Additional context

  • I updated the Oculus Integration but it did not help
  • Disabling OverlayBrowserView will launch the app without crashing

Platform information

OS: Windows 10
HMD: Oculus Quest 2
Unity: 2019.4.14f1

open in new tab

I've been able to build the GackoViewPlugin. Now I'm trying to figure out how I can modify it to make it open clicked <a href=""/> links which has target="_blank" attribute e.g "open in new tab" at least in the current "browser" session tab.

N.B:
I have a side question about GeckoViewPlugin build. In the "Problems" view, Android Studio reports Cannot resolve symbol 'unity3d' on import com.unity3d.player.UnityPlayer; and Cannot resolve symbol 'UnityPlayer' everywhere it's used. However it builds successfuly. How is that posbile?

Incorporating Browser into other Unity Projects

I was just wondering if there are any more specific instructions that can be given on bringing the browser (and all necessary code/plugins) into another unity project. I've replicated the Underlay browser scene perfectly in another project but the application consistently crashes after a few frames after launching.

build stop with 'ArgumentException: The Assembly UnityEditor is referenced by UniRx.Async'

Hi, I'm a beginner at unity.
I imported UnityOculusAndroidVRBrowser and fixed the conflict with my default oculus plugin.
But when I build it, stoped with 'ArgumentException: The Assembly UnityEditor is referenced by UniRx.Async'.
Detail is here,

ArgumentException: The Assembly UnityEditor is referenced by UniRx.Async ('Assets/UnityOculusAndroidVRBrowser-master/UnityProject/obj/Debug/UniRx.Async.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:194)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Please tell me how to fix this.
Thank you.

How to implement multiple windows

Hi, thank you for the great plugin!
I would like to implement multiple windows using this plugin. Do you have any tips on how to implement it?

I think it is possible to run multiple sessions by duplicating OVRSurfaceGeckoView. But I don't know how to render it in OVROverlay...

Execute javascript?

Hi! I'm trying to use this asset.
Can I execute javascript on a browser?
I need to execute a UserScript to customize a website

How to build geckoViewPlugin in android studio

When building via the rebuild option i get

Execution failed for task ':app:externalNativeBuildCleanDebug'.
> A problem occurred starting process 'command '/Users/ianphilips/Library/Android/sdk/cmake/3.6.4111459/bin/cmake''

so to build the .aar file i use gradlew assemble

after building it and renaming the 'app-release.aar' to the old name (is the necessary?) I get the following error;

Note: C:\Unity Projects\UnityOculusAndroidVRBrowser\UnityProject\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.eyeflite.ian.geckoviewplugin.BuildConfig found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.BytesBuffer found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$1 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$10 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$11 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$12 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$13 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$14 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$15 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$16 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$17 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$18 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$2 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$3 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$4 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$5 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$6 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$7 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$8 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$9 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$SessionTypes found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$1 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$2 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$3 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$Display found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  Duplicate class com.eyeflite.ian.geckoviewplugin.UnityInterface found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
  
  Go to the documentation to learn how to Fix dependency resolution errors.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr)

Decouple from OVROverlay

The webview is rendered by OVROverlay, and it will always render in front of everything else (overlay is in front of eye texture)

So when converted the scene to use controllers input instead of gaze, the controller is always looks behind the webview, and looks wired.

And because this is based on oculus sdk, it is hard to use in other mobile vr platforms such as daydream and pico.

Maybe there is a way to get rid of oculus sdk?

Get the Uppercase Letter and other Umlaut Symbol

Currently I am developing the VR keyboard. I am able to input Lowercase, numbers and some Symbol(e.g. !?.-+ etc.) from this keycode list here(https://android.googlesource.com/platform/frameworks/native/+/master/include/android/keycodes.h).

public void RButtonInput()
{
   int javaCode = 46; // 46 is keycode for 'r'
   CallAjc("AddKeyCode", new object[] { javaCode });
   //this is 'r' char letter.
}

However how do i implement an uppercase letter of R?
And what is the keycode for other alphabet like ö ä ü ß ..?

Thank you for your help.

Decouple from Oculus SDK

Can I use it without the oculus sdk? I'm planning to use it on android not oculus, and I'll really love to use it, maybe even showing the result if you want.
Nice work!

BrowserView render on top of everything

Hi2.

Small question, Does the BrowserView has to be rendered on top of everything?
I have a keyboard that use a canvas renderer and as well as some other game object with default unity material.
And the BrowserView gameobject is always render in top of the canvas as well as every other game object.

Need a simple sample

I am sorry for bothering you, but finally I found most suitable plugin for my project. I have tried yours but still getting problem. Can you make a simple sample scene that only show this web browser in a plane without oculus integration, I mean by using the camera instead. I will be really grateful if you could help me...I have been struggling with my diploma final project.

:( :(

Change Browser View Resolution

Sorry if this is a dumb question, but I'm a complete noob with unity. Is it possible to change the resolution of the browser view and the web page rendered? In the demo project I've tried changing the height/width of the browserview component to 2560x1440, as well as the height and width of the ovr overlay external surface, but the webpage still renders as if the resolution is extremely small. Thanks

Modern Mobile Gmail doesn't work, has to be original theme

Something about the new Gmail look doesn't allow WebView.enableSlowWholeDocumentDraw(); to work properly and users can only see initial screen dimensions worth of the UI. A user has to click on the compose icon and then scroll down to the bottom of that to choose the original look for Gmail to load properly. May have to file a bug or investigate scrolling with via Javascript.

updating Geckoview breaking changes

Just to let one knows that there are breaking changes starting from version 105.0.20220912145803 of geckoview which prevent GeckoViewPlugn to compile:

> Task :app:compileDebugJavaWithJavac FAILED
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\GeckoViewPLugin.java:728: error: method does not override or implement a method from a supertype
    @Override
    ^
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:67: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
                mDisplay.surfaceChanged(mSurface, mWidth, mHeight);
                        ^
  required: SurfaceInfo
  found: Surface,int,int
  reason: actual and formal argument lists differ in length
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:117: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
                mDisplay.surfaceChanged(mSurface, width, height);
                        ^
  required: SurfaceInfo
  found: Surface,int,int
  reason: actual and formal argument lists differ in length
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:136: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
                mDisplay.surfaceChanged(holder.getSurface(), width, height);

Distortion around edges of browser

Some builds will show distortion at the edges of browser - I have no idea why. My current solution is to import a rectangular texture asset that has a hole cut out in the middle in the shape of your browser, render it into an OVROverlay, and position it to cover a couple virtual inches of space around the browser to hide the distortion. LMK if this is unclear, and I should just upload the asset I'm using.

Oculus quest?

did anyone try to run this on oculus quest?

I am having trouble running this on Oculus Quest, the main problem with it is that logcat shows no errors whenever the app crashes.

Also I noticed that portion of the log complaining about BasicActivity, which did not make much sense to me,due to me being fairly new to android system.

`04-02 23:25:56.530 10637 10654 I AndroidUnity: Hi, new instance created

04-02 23:25:56.530 10637 10654 I AndroidUnity: CREATING FRAGMENT

04-02 23:25:56.531 10637 10637 D AndroidUnity: On Create View!

04-02 23:25:56.531 10637 10637 D AndroidUnity: On inflate View!

04-02 23:25:56.537 10637 10637 I AndroidUnity: BasicActivity not found! We are a library and not an application

04-02 23:25:56.538 10637 10637 I AndroidUnity: activity is not null, setting basic selection delegate and using floating bar: true

04-02 23:25:56.538 10637 10637 I AndroidUnity: CREATING runtime

04-02 23:25:56.552 10637 10654 D AndroidUnity: My unity callback is set

04-02 23:25:56.569 10637 10637 I AndroidUnity: CREATING sessions hashmap`

No XR Setting

How could I only use webview and clear XR setting in this project?

Changing the browser's status(?) from Mobile device to Desktop device

Just want to say, first off, this browser plugin is incredible. It's really cool that you were able to create this.

I had a question about how the browser appears to visited websites. If I'm not mistaken, the browser is recognized by sites like Google and Youtube as a mobile platform. I'm currently working on implementing this browser in a project and was wondering if there was some way to designate in the plugin that the browser should force itself to be labeled as a desktop platform.

Thank you in advance, I hope this isn't a terribly difficult question.

Call javascript from unity or vice versa

Hey first of all Thanks for the Plugin!

I had one doubt i.e is there a way to call javascript function from unity or call unity function from javascript or send data accordingly?

Website not displaying

Hey! I have downloaded the latest source code and even the beta builds, and no matter what I try, nothing appears on the Quad. The website never shows up on the Quad. Any way to get this to work?

Can I 'request desktop site'?

Some sites will only give you the mobile version, but there are times when you really just need the desktop version (Microsoft Teams and Jit.si from my tests). Any way to do that?

Browser View content not showing anything

Hi,

I'd like to say that this is a great idea and it's something that I've been needing for a project that I'm currently working on,

but however, I've been running the demo scenes and for some reason, it's not showing any content it the BrowserView window?

I'm a beginner, and not very experienced with programming or Unity, it may just be because I'm new to all this and I'm making a simple error.

Could you be able to help me out?

Thanks.

Only works for arm7

Whenever I set the target architecture to arm7 every works as expected. But if I try to build for arm64 the web browser crashes the app upon loading. Is there something that requires it to be build for arm7 or just a setting somewhere that I am missing that would allow it to be built for arm64

Update geckoview to highest version

  1. Change the build.gradle settings to pull the latest geckoview version (now 81.x ).

  2. Make sure the API hasn't introduced breaking changes, and move the compiled plugin to the plugins folder.

  3. Test on the headset

How can we make RestartSession work?

Hi,

Great job on the project! I'm using it to play videos in VR and it works very well. One issue that I'm running into is restarting the View after hiding/showing the browser window. I tried uncommenting the RestartSession method, but, as the TODO comment states, the texture is not being updated after restart. Do you know what could be causing that or any ways to get around it?

Thanks!

Pop Up Windows

Hello,
Thanks for providing this great browser.
We're using it to show a website within an Oculus app, and this site has some pop up windows. These pop up windows do not show up in the browser, and so the user is unable to interact with them.
If this is something we should be able to do, but we're not doing it right, please could you let me know how to do it?
Otherwise, is this something we could request?
Thanks,
Ed

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.