React Native + WebView + android emulator, WebGL support












1















I'm trying to make React Native app with using WebGL (actually, Cesium lib if it matters) in WebView component. I've written a little app to test WebGL support: simple WebView (react-native-webview) loading http://get.webgl.org and run it on android emulator. As site says, if WebGL support is enabled, I should see a spinnig cube, but all I can see is "Hmmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card".



And some interesting facts:

1) App based on AngularJs + Cordova + Ionic (which uses the same WebView-technology internally and the same Cesium lib) works perfectly on that emulator

2) I checked WebGL support (http://get.webgl.org, http://webglreport.com) in Chrome browser on emulator, and it's all good, no problems



So, the question is "what should I do with this?". Should I write native Java-based component for React? Or there are some settings in React Native WebView, in android app bundle files or somewhere else. Should I use another component provided WebView with WebGL support? Is that a problem with android emulator or with its settings? Well, I'm opened for any solutions and suggestions. There is a tiny chance that app will work fine on real device but it's critical for me to run and debug it on emulator.



Some technical information:

1) packages versions: react - 16.6.3, react-native - 0.57.8, react-native-webview - 2.14.3

2) OS: Windows 10, x64

3) emulator: official emulator from Google, API 25, tried with software and hardware graphics rendering settings










share|improve this question



























    1















    I'm trying to make React Native app with using WebGL (actually, Cesium lib if it matters) in WebView component. I've written a little app to test WebGL support: simple WebView (react-native-webview) loading http://get.webgl.org and run it on android emulator. As site says, if WebGL support is enabled, I should see a spinnig cube, but all I can see is "Hmmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card".



    And some interesting facts:

    1) App based on AngularJs + Cordova + Ionic (which uses the same WebView-technology internally and the same Cesium lib) works perfectly on that emulator

    2) I checked WebGL support (http://get.webgl.org, http://webglreport.com) in Chrome browser on emulator, and it's all good, no problems



    So, the question is "what should I do with this?". Should I write native Java-based component for React? Or there are some settings in React Native WebView, in android app bundle files or somewhere else. Should I use another component provided WebView with WebGL support? Is that a problem with android emulator or with its settings? Well, I'm opened for any solutions and suggestions. There is a tiny chance that app will work fine on real device but it's critical for me to run and debug it on emulator.



    Some technical information:

    1) packages versions: react - 16.6.3, react-native - 0.57.8, react-native-webview - 2.14.3

    2) OS: Windows 10, x64

    3) emulator: official emulator from Google, API 25, tried with software and hardware graphics rendering settings










    share|improve this question

























      1












      1








      1








      I'm trying to make React Native app with using WebGL (actually, Cesium lib if it matters) in WebView component. I've written a little app to test WebGL support: simple WebView (react-native-webview) loading http://get.webgl.org and run it on android emulator. As site says, if WebGL support is enabled, I should see a spinnig cube, but all I can see is "Hmmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card".



      And some interesting facts:

      1) App based on AngularJs + Cordova + Ionic (which uses the same WebView-technology internally and the same Cesium lib) works perfectly on that emulator

      2) I checked WebGL support (http://get.webgl.org, http://webglreport.com) in Chrome browser on emulator, and it's all good, no problems



      So, the question is "what should I do with this?". Should I write native Java-based component for React? Or there are some settings in React Native WebView, in android app bundle files or somewhere else. Should I use another component provided WebView with WebGL support? Is that a problem with android emulator or with its settings? Well, I'm opened for any solutions and suggestions. There is a tiny chance that app will work fine on real device but it's critical for me to run and debug it on emulator.



      Some technical information:

      1) packages versions: react - 16.6.3, react-native - 0.57.8, react-native-webview - 2.14.3

      2) OS: Windows 10, x64

      3) emulator: official emulator from Google, API 25, tried with software and hardware graphics rendering settings










      share|improve this question














      I'm trying to make React Native app with using WebGL (actually, Cesium lib if it matters) in WebView component. I've written a little app to test WebGL support: simple WebView (react-native-webview) loading http://get.webgl.org and run it on android emulator. As site says, if WebGL support is enabled, I should see a spinnig cube, but all I can see is "Hmmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card".



      And some interesting facts:

      1) App based on AngularJs + Cordova + Ionic (which uses the same WebView-technology internally and the same Cesium lib) works perfectly on that emulator

      2) I checked WebGL support (http://get.webgl.org, http://webglreport.com) in Chrome browser on emulator, and it's all good, no problems



      So, the question is "what should I do with this?". Should I write native Java-based component for React? Or there are some settings in React Native WebView, in android app bundle files or somewhere else. Should I use another component provided WebView with WebGL support? Is that a problem with android emulator or with its settings? Well, I'm opened for any solutions and suggestions. There is a tiny chance that app will work fine on real device but it's critical for me to run and debug it on emulator.



      Some technical information:

      1) packages versions: react - 16.6.3, react-native - 0.57.8, react-native-webview - 2.14.3

      2) OS: Windows 10, x64

      3) emulator: official emulator from Google, API 25, tried with software and hardware graphics rendering settings







      android react-native webview webgl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 28 '18 at 12:48









      russellrussell

      61




      61
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53958874%2freact-native-webview-android-emulator-webgl-support%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53958874%2freact-native-webview-android-emulator-webgl-support%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas

          Can't read property showImagePicker of undefined in react native iOS