Detect Platform

Hi,

How can I detect if the client device is not running Windows?

Thanks,

Ken

You can do this with:


begin
   showmessage(window.navigator.userAgent);
end;

Thanks but that won't compile!

Is the unit web added to your uses list.
On a new form in a new app, this works out of the box here.

Thanks, my bad!

Can I safely assume that the first 3 characters of window.navigator.platformwill always be 'Win'?

No, please see:

https://deviceatlas.com/blog/list-of-user-agent-strings