UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. ari
    3. Best
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 13
    • Groups 0

    Posts

    Recent Best Controversial
    • How to port Flutter App

      Hello.

      I've just discovered a way to remove the service worker requirement from Flutter Web Applications. Making it much easier to create a simple Flutter Application for Ubuntu Touch.

      Here's a little tutorial for anyone who might want to try it out:

      Compile your flutter application with the following:

      flutter build web --pwa-strategy none
      

      Change the index.html base to:

      <base href="">
      

      Optional: add the following to the body to prevent right click menu on long press

      <body oncontextmenu="return false;">
      

      Then change line 48 of flutter.js to

      return this._loadWithServiceWorker(entrypointUrl, null);
      

      (This will disable the service worker)

      You can test it out with the following:

      brave --allow-file-access-from-files index.html
      

      For Ubuntu Touch:

      Create an HTML clickable app.

      Copy the flutter compiled /web to the clickable www.

      Add the following to the .desktop exec after webapp-container:

      --local-content-can-access-remote-urls
      

      That's it. You now have a super simple app made from flutter, no local server needed. (I wouldn't expect the camera or any phone specific functions to work, but there's still a lot you can do.)

      I've just published an example "Pictionary Generator" to the open store you can try.

      posted in App Development
      A
      ari
    • U2F?

      Any support for hardward 2fa keys? FIDO U2F, YubiKey, Google Titan...

      Just heard about a deal on cheap YubiKey, but realised they probably wouldn't work on Ubuntu Touch.

      From my understanding to get it to work, one would need it installed on the OS (libu2f-udev in apt), which might be possible if I make the root read-write.

      But the browser also has to support it, and I have a feeling Morph Browser doesn't.

      Is this in the radar? Is it possible with some tinkering? Or should I just avoid that method of 2fa?

      To be clear I'm interested in using it to log into online accounts, not into the os.

      posted in General
      A
      ari
    • RE: Camera not working in Webview

      Finally figured it out. Well... kind of.
      The solution is to not use the Webview, but instead WebEngineView, and make sure to include the onFeaturePermissionRequested method.
      In conclusion, just steal the code from the discord app.

      posted in App Development
      A
      ari
    • RE: Matrix Notifications Existential Crisis

      @kugiigi Thanks for the reply.

      Perhaps I should have given a little more context. Matrix (server protocol) has an option for custom push notification apis. What Cinny seems to be doing, is sending the api url to the server, which the matrix server then uses to send the push notifications.

      Evidently UBports realizes this use-case and created an endpoint to accept the matrix-formatted api call. But I cannot find any documentation.

      Does anyone know anything about this?

      Or who specifically to contact?

      posted in App Development
      A
      ari
    • WebGL between Clickable Templates

      Skipable preamble: I'm back to trying to port some flutter apps, everything is working fine and I'm ready to publish them, except for one thing: WebGL. My apps are running really slow (yes they are all just local webapps), but if I try them on the morph browser, its suddenly smooth. Well clearly this is the reason:

      webgl_ut_comparison.png

      To test, I've created 3 simple clickable applications using; (from left to right) CPP template, (second is just regular morph browser), GO template and QML Only template.

      I added 'import QtWebEngine 1.10', and pointed them all to the same website with WebEngineView: https://webglreport.com/

      Result: Only the 'QML Only' template has WebGL.

      What can I do to give my C++ apps WebGL? How does Morph do it?

      Appreciate any help. Thank you 🙂

      p.s. I've tried adding 'settings.webGLEnabled: true', doesnt help.

      p.p.s I'm running UT 20.04 OTA-2 on a Pixel 3a

      posted in App Development
      A
      ari