How to get Cookies and Headers for GeckoView?

44 Views Asked by At

I started to use GeckoView instead of Android WebView because of it is much more beautiful and stable

But I couldn't find and example to get Cookies and Url headers in geckoview. Anyone know it?

My Setup for gecko:

GeckoRuntimeSettings.Builder builder = new GeckoRuntimeSettings.Builder();
            geckoSession = new GeckoSession();
            if (geckoRuntime == null) {
                geckoRuntime = GeckoRuntime.create(WebviewActivity.this, builder.build().setJavaScriptEnabled(true));
            }
            geckoSession.open(geckoRuntime);
            geckoView.setSession(geckoSession);
            geckoSession.getSettings().setAllowJavascript(true);
            geckoSession.getSettings().setUserAgentOverride("Custom-Agent");
            geckoSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
            geckoSession.loadUri("https://someurl");
0

There are 0 best solutions below