How to resolve "No such context" found exception

I’m seeing “No such context found” exception and also “webview” does not appear for my hybrid app in real device. How to resolve this issue? Please help me to solve this.

// Switching code

Set contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println( contextName );
if (contextName.contains( “WEBVIEW” )) {
driver.context( contextName );
System.out.println( contextName );
try {
Thread.sleep( 1500 );
} catch (InterruptedException e) {

You can watch this video :

Thanks, I will try it and let you know.

Didn’t work for me…

you can fix that???