I like to use the findAll / findAllAsync method in android.webkit.WebView. findAll is deprecated, and Google suggests using findAllAsync, which requires a Jelly Bean or higher. However, I like my app for 2.2+ support. I tried to do the following, but I got a warning for findAll (deprecation) and an error for findAllAysnc (you need to increase the minimum version of the SDK):
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
myWebView.findAll(query);
else
{
myWebView.findAllAsync(query);
}
What is the best way to handle this? Should I just use findAll and ignore the failure warning?
source
share