Need help with CustomWebView

Hi, I recently started learning MIT App Inventor. I started a topic yesterday about something advanced using CustomWebView, but guess my basics itself isn't correct. I wanted to create an app with which I could use whatsapp webview. Here is the block -


Atleast it seemed to work till yesterday. But from today after opening the app for the first time, it opens whatsapp web, but from the second time onwards it is opening mobile view. If I clear cache and clear data from app settings, it again loads the whatsapp webview for the first time and thereafter it opens mobile page. I searched the net if someone else had this issue. Then I came across a github post, which described the same issue - On first load the app loads the desktop page but then it loads the mobile page ie www.whatsapp.com · Issue #1 · Poujhit/WhatsAppWeb-App · GitHub . I tried adding extra checks to my app by clearing cache and also checking the useragent, but nothing would solve this. Can you please tell on where I am doing it wrong?

Thanks,
Nilin

Show the full user agent you are using

Here is my useragent - Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:111.0) Gecko/20100101 Firefox/111.0

I also tried this useragent, but same issue. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

You could try this one:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

or try the default useragent, but remove ; wv from it (semi-colon space w v)

@TIMAI2 I tried the first useragent you suggested, but it is the same issue. It loads whatsapp web for the first time and subsequent times, it loads the mobile site.
I tried your second suggestion also, not sure if this is the correct way of doing it? Please see here -


But it didn't load web whatsapp even for the first time after install.

Let us try a different route.

Use the webviewer (so do not use customwebview at all) and this extension:

webviewextra

It may just load the mobile site though....

Thank you so much @TIMAI2 for letting new users like me to try new routes for the solution. I did try like this to get url, but the textbox didn't get any response.
webview2
If you don't mind can we continue the tests tomorrow? I seem to have become very ill by the evening.