androidhtmlrenderinggeckoview

How can i render html with using geckoview?


I wanted to download a html file from a website first and edit that website and print that html with geckoview render engine

I know how to fetch a html and parse it but i don't know how to render it with using the renderengine

Geckoview just uses a url of a website

I don't want to use webview because i don't think it's not that good to make my own web browser app


Solution

  • GeckoSession has loadString(String htmlString, String mimeType) method:

    GeckoSession geckoSession = ...;// here you start session in your GeckoView
    geckoSession.loadString(yourHTMLString, "text/html");