I am playing a video in a WebView
.
If a memory leak is to be avoided, the ApplicationContext
(as against an Activity
context) has to be used to instantiate the WebView
(refer to this)
If I pass in the ApplicationContext
and the VideoView
inside the WebView
needs to create a dialog (typically for 'Cannot play this Video'), I get a BadTokenException
(refer to this)
Are we expected to decide between a memory leak or a potential ANR?