1

I have a unique situation. I need to pass a javascript method to webview so that the web app I am launching in the webview is able to call that method to notify loading status. The loading status will be error, loading, done etc. The default loading status was not giving us an accurate idea so our spinner would disappear but the web app would not have completed loading. So we want the webapp to let Android know when its actually done loading. How can I achieve this?

ish herr
  • 93
  • 5

1 Answers1

1

The method you are describing is basically webview script injection. Sometimes knowing the name of something makes all the difference. There are many tutorials out there so I'll just link some here:

Inject JS into Android’s WebView

Inject javascript file to my site with webview in android

cyqsimon
  • 2,752
  • 2
  • 17
  • 38