0

I am evaluating Gecko view by Mozilla as a potential Webview for displaying HTML pages in my android app. I want a callback mechanism where if Gecko view is unable to load the page, I should be able to fall back to Android's default Webview or Chrome custom tabs. I was looking into Gecko view's documentation here but I can't figure out if Gecko view provides such callbacks or not.

Is it possible to implement such behavior with Geckoview?

Manishearth
  • 14,882
  • 8
  • 59
  • 76
Ezio
  • 2,837
  • 2
  • 29
  • 45

2 Answers2

1

There is a page progress session delegate with onPageStop which I believe is the same:

session.setProgressDelegate(new GeckoSession.ProgressDelegate() {
        @Override
        public void onPageStart(@NonNull @NotNull GeckoSession session, @NonNull @NotNull String url) {
            
        }

        @Override
        public void onPageStop(@NonNull @NotNull GeckoSession session, boolean success) {

        }
    });
Daniel Wilson
  • 18,838
  • 12
  • 85
  • 135