Similar to this question except from the other point of view. My project is targeting an API level < 23, so I have to use the deprecated version of onReceivedError, otherwise I get errors about unknown classes.
The case I am trying to detect is when the page is unable to load due to network issues. To test I am running in airplane mode. The onReceivedError function is never called. The onPageFinished function is being called, but it doesn't pass any info that can be used to detect that the page couldn't be loaded.
One of the comments to the above question:
Even if you develop your app on API 23 SDK, but then run the app on Android Lollipop, you will still be getting the "old" onReceivedError, because it's the feature of the OS, not of an SDK.
If true, this seems to suggest that the opposite may actually be true - if I am running on a device with API level >= 23 (which I am) I can't actually get the old onReceivedError to be called, because the OS doesn't support it. But if that is truly the case, then how can I get it, because I can't actually use the new call at all. Or maybe it isn't true?