How can I detect if a web app is opened by a mobile browser or an PC?

The required change is:
Replace
document.write(“mobile device”);
With
ThunkableWebviewerExtension.postMessage(‘mobile device’);

Do the same for the other statement.

Also move the <script scr="https…

Above your code.

1 Like