Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Custom Android webview ?
Servers for Qt installer are currently down

Custom Android webview ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
14 Posts 3 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jhayar
    wrote on 7 Dec 2023, 09:07 last edited by jhayar 12 Jul 2023, 09:14
    #1

    Any way i can use my custom android webview and add it on QML instead of using built in QWebView ?

    like on ioswebview from this link
    https://github.com/g00dnight/IOSWebView

    since there is vulnerability exist in using QWebView even i disable javascript in QWebview the vuln with medium risk still exist so i'm thinking to create custom webview so i can disable the webview to remove Medium Risk

    any ideas how to achieve this ?

    thank you

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jhayar
      wrote on 9 Dec 2023, 09:12 last edited by
      #2

      anyone ? i really need this .

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 9 Dec 2023, 09:56 last edited by
        #3

        Hi,

        Qt uses the native web view of the OS if there's one provided and that's the case for both iOS and Android (and mandatory by the way) so I am not sure what you want to do exactly.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        J 1 Reply Last reply 10 Dec 2023, 12:35
        0
        • S SGaist
          9 Dec 2023, 09:56

          Hi,

          Qt uses the native web view of the OS if there's one provided and that's the case for both iOS and Android (and mandatory by the way) so I am not sure what you want to do exactly.

          J Offline
          J Offline
          jhayar
          wrote on 10 Dec 2023, 12:35 last edited by
          #4

          As i said earlier , QWebView has existing vulnerability when scanned in pentool , this is Javascript Enabled which is rated Medium Risk , disabling javascript in Qt WebView doesn't fix it.

          so i need to create own android webview to remove that medium risk

          T 1 Reply Last reply 10 Dec 2023, 13:30
          0
          • J jhayar
            10 Dec 2023, 12:35

            As i said earlier , QWebView has existing vulnerability when scanned in pentool , this is Javascript Enabled which is rated Medium Risk , disabling javascript in Qt WebView doesn't fix it.

            so i need to create own android webview to remove that medium risk

            T Offline
            T Offline
            TomZ
            wrote on 10 Dec 2023, 13:30 last edited by
            #5

            @jhayar can you share the NIST CVE number of the security vulnerability you are referring to?

            J 1 Reply Last reply 11 Dec 2023, 01:19
            0
            • T TomZ
              10 Dec 2023, 13:30

              @jhayar can you share the NIST CVE number of the security vulnerability you are referring to?

              J Offline
              J Offline
              jhayar
              wrote on 11 Dec 2023, 01:19 last edited by jhayar 12 Nov 2023, 01:21
              #6

              @TomZ
              2743305a-9859-4ed2-8deb-919a60c97092-image.png

              I think QWebView by default javascript is enable. so disabling javascript in QWebView doesn't effect the WebView code from android java code .

              so i'm thinking to remove WebView in CMakeLists then create my own webview and add to Qt View . but there's no documentation how to use custom android native view .

              T 1 Reply Last reply 11 Dec 2023, 11:26
              0
              • J jhayar
                11 Dec 2023, 01:19

                @TomZ
                2743305a-9859-4ed2-8deb-919a60c97092-image.png

                I think QWebView by default javascript is enable. so disabling javascript in QWebView doesn't effect the WebView code from android java code .

                so i'm thinking to remove WebView in CMakeLists then create my own webview and add to Qt View . but there's no documentation how to use custom android native view .

                T Offline
                T Offline
                TomZ
                wrote on 11 Dec 2023, 11:26 last edited by TomZ 12 Nov 2023, 11:28
                #7

                @jhayar thank you for the post.

                I think you misunderstood that report. The CWE index is not about vulnarabilities.

                additionally, the screenshot is weird. It refers to CWE 749, but the actual one is about something very different.

                https://cwe.mitre.org/data/definitions/749.html

                J 1 Reply Last reply 12 Dec 2023, 00:22
                0
                • T TomZ
                  11 Dec 2023, 11:26

                  @jhayar thank you for the post.

                  I think you misunderstood that report. The CWE index is not about vulnarabilities.

                  additionally, the screenshot is weird. It refers to CWE 749, but the actual one is about something very different.

                  https://cwe.mitre.org/data/definitions/749.html

                  J Offline
                  J Offline
                  jhayar
                  wrote on 12 Dec 2023, 00:22 last edited by
                  #8

                  @TomZ , i see thanks for the clarification and the link reference ,

                  But , is there a way i can use my own custom android webview so i can remove that CWE report? , our infosec doesn't allow us to publish the app with that medium risk ,

                  Thanks

                  T 1 Reply Last reply 12 Dec 2023, 15:12
                  0
                  • J jhayar
                    12 Dec 2023, 00:22

                    @TomZ , i see thanks for the clarification and the link reference ,

                    But , is there a way i can use my own custom android webview so i can remove that CWE report? , our infosec doesn't allow us to publish the app with that medium risk ,

                    Thanks

                    T Offline
                    T Offline
                    TomZ
                    wrote on 12 Dec 2023, 15:12 last edited by
                    #9

                    @jhayar said in Custom Android webview ?:

                    is there a way i can use my own custom android webview

                    Not using Qt classes.

                    @jhayar said in Custom Android webview ?:

                    our infosec doesn't allow us to publish the app with that medium risk ,

                    that sounds like a problem your organization should fix, as the effect is clearly that you deliver worse code.

                    J 1 Reply Last reply 13 Dec 2023, 04:34
                    0
                    • T TomZ
                      12 Dec 2023, 15:12

                      @jhayar said in Custom Android webview ?:

                      is there a way i can use my own custom android webview

                      Not using Qt classes.

                      @jhayar said in Custom Android webview ?:

                      our infosec doesn't allow us to publish the app with that medium risk ,

                      that sounds like a problem your organization should fix, as the effect is clearly that you deliver worse code.

                      J Offline
                      J Offline
                      jhayar
                      wrote on 13 Dec 2023, 04:34 last edited by jhayar
                      #10

                      @TomZ no , the detected is not from my code but the built in QWebView ,

                      Not using Qt classes.

                      Yes i know that it can't be done in Qt classes , but i believe QWebView is just extended anroid.webkit.WebView , so i also believe that there is a way we can use our own Webview extending android.webkit.WebView then add it in QT .

                      but it is something Qt didnt create a documentation for that or they just simply dont want to disclose it .

                      S 1 Reply Last reply 13 Dec 2023, 21:00
                      0
                      • J jhayar
                        13 Dec 2023, 04:34

                        @TomZ no , the detected is not from my code but the built in QWebView ,

                        Not using Qt classes.

                        Yes i know that it can't be done in Qt classes , but i believe QWebView is just extended anroid.webkit.WebView , so i also believe that there is a way we can use our own Webview extending android.webkit.WebView then add it in QT .

                        but it is something Qt didnt create a documentation for that or they just simply dont want to disclose it .

                        S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 13 Dec 2023, 21:00 last edited by
                        #11

                        @jhayar not disclose what ? The module is open source and available as the rest of Qt. Just clone it and modify it for your use case.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        J 1 Reply Last reply 14 Dec 2023, 00:07
                        0
                        • S SGaist
                          13 Dec 2023, 21:00

                          @jhayar not disclose what ? The module is open source and available as the rest of Qt. Just clone it and modify it for your use case.

                          J Offline
                          J Offline
                          jhayar
                          wrote on 14 Dec 2023, 00:07 last edited by
                          #12

                          @SGaist what i mean for not disclosed is the documentation related on using /embedding native android view in QT , for example android.view.View / android.webkit.WebView

                          S 1 Reply Last reply 14 Dec 2023, 20:31
                          0
                          • J jhayar
                            14 Dec 2023, 00:07

                            @SGaist what i mean for not disclosed is the documentation related on using /embedding native android view in QT , for example android.view.View / android.webkit.WebView

                            S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 14 Dec 2023, 20:31 last edited by
                            #13

                            @jhayar did you take a look at the QtWebView sources I linked in my previous answer ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jhayar
                              wrote on 19 Dec 2023, 09:56 last edited by
                              #14

                              hello thank you for all the response trying to help me , will close this now , I already figured out how to use android native View and embed it to QT/QML , using QWindow::findWinId thank you

                              1 Reply Last reply
                              0
                              • J jhayar has marked this topic as solved on 19 Dec 2023, 09:56

                              1/14

                              7 Dec 2023, 09:07

                              • Login

                              • Login or register to search.
                              1 out of 14
                              • First post
                                1/14
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved