0

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

TYFA
  • 313
  • 1
  • 10

3 Answers3

3

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

GeckoSession geckoSession = ...;// here you start session in your GeckoView
geckoSession.loadString(yourHTMLString, "text/html");
Vladyslav Matviienko
  • 10,610
  • 4
  • 33
  • 52
1

geckoSession.loadData("My First Heading. My first paragraph.".getBytes(StandardCharsets.UTF_8),"text/html");

Amine Mech
  • 11
  • 1
0

geckoSession.loadString("<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>","text/html") displays blank page. Awesome!