Unable to swtich context to webview on Android

On Android devices with kitkat (osversion 4.4.2, 4.4.4, devices are LG Flex, S4, and XAOMI m4) I am unable to switch to webview. See logs :

_[MJSONWP] Calling AppiumDriver.setContext() with args: ["WEBVIEW_com.app.downloadmanager","265bb825-7426-456e-be15-434bc3b42d12"]_

_MJSONWP] Calling AppiumDriver.getContexts() with args: ["187d6afe-ef45-4b46-a364-791f2bb56910"]_

_[debug] [AndroidDriver] Getting a list of available webviews_

_[debug] [ADB] Getting connected devices..._

_[debug] [ADB] 1 device(s) connected_

_[debug] [ADB] Running /library/android/sdk/platform-tools/adb with args: ["-P",5037,"-s","052c32b76251d34c","shell","cat","/proc/net/unix"]_

_[debug] [AndroidDriver] Found webviews: []_

_[debug] [AndroidDriver] Available contexts: ["NATIVE_APP"]_

_[MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP"]_

_[HTTP] <-- GET /wd/hub/session/187d6afe-ef45-4b46-a364-791f2bb56910/contexts 200 67 ms - 86_ 

However, on Android devices with lollipop and Marshmallow (osversion 5.0.2, 5.1.1, 6.0.1, devices are sony z1, sony z3, s7 ) I am able to switch to web view. See logs:

_[debug] [AndroidDriver] Getting a list of available webviews_

_[debug] [ADB] Getting connected devices..._

_[debug] [ADB] 1 device(s) connected_

_[debug] [ADB] Running /library/android/sdk/platform-tools/adb with args: ["-P",5037,"-s","BH916ZS40D","shell","cat","/proc/net/unix"]_

_[debug] [AndroidDriver] WEBVIEW_18306 mapped to pid 18306_

_[debug] [AndroidDriver] Getting process name for webview_

_[debug] [ADB] Getting connected devices..._

_[debug] [ADB] 1 device(s) connected_

_[debug] [ADB] Running /library/android/sdk/platform-tools/adb with args: ["-P",5037,"-s","BH916ZS40D","shell","ps"]_

_[HTTP] --> GET /wd/hub/status {}_

_[MJSONWP] Calling AppiumDriver.getStatus() with args: []_

_[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.2","revision":null}}_

_[HTTP] <-- GET /wd/hub/status 200 9 ms - 83 _

_[debug] [AndroidDriver] Parsed pid: 18306 pkg: com.app.downloadmanager!_

_[debug] [AndroidDriver] from: u0_a747,18306,368,1959016,210160,ffffffff,00000000,R,com.app.downloadmanager_

_[debug] [AndroidDriver] returning process name: com.app.downloadmanager_

_[debug] [AndroidDriver] Found webviews: ["WEBVIEW_com.app.downloadmanager"]_

_[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.app.downloadmanager"]_

_[debug] [AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_com.app.downloadmanager'_

I am using Appium v 1.5.2 and Appium was installed through npm.

WebView.setWebContentsDebuggingEnabled(true); is set in the app

The following code makes the switch:

private void changeContext(int context) {        
    Set<String> contextNames = driver.getContextHandles();
    driver.context((String) contextNames.toArray()[context]);
}

I have tried adding an action wait/thread sleep before and I have tried adding a TouchAction to get focus before switching context and neither made a difference in finding the webview.