You could look into deeplinks / dynamic links to redirect the user back into your app after finishing on the web, but that could feel a bit clunky. (And if you want this to work on iPhone it may not work at all, I recollect that deep-linking to your app doesn't work from Safari -- but I could be wrong.)
You can always use a WebView and monitor the URL changes. At the end of doing something, you can redirect the web page to a specific URL (like, for example, with "finished=1" as query parameter) so your code can pick that up and can detect it should close the webview and the user will be back in the app. You could add more interesting data to return to your app in that URL too (for example, "
https://example.com/something?finished=1&resultCode=124&message=Foo").
Hope this helps.