'How to show whatsapp with correct user-agent

I want to show whatsapp web in my webview. I was use an user agent, but i still can't to open it. Please help to to show the whatsapp web in my webview.

This is my code:

myWebView.getSettings().setJavaScriptEnabled(true);
String agent = "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.121 Safari/537.36"; 
myWebView.getSettings().setUserAgentString(agent);

What should I do?



Solution 1:[1]

I checked the logcat and I saw errors like

cannot call determinedvisibility() - never saw a connection for the pid

I fixed the issue by adding:

simpleWebView.getSettings().setDomStorageEnabled(true);

to the code and the web view is working.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pang