Detect current platform

Discussion about recent product features & solutions!
4 posts • Page 1 of 1
Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Detect current platform

Post by Dag-Are.Trydal@nov.com »

Is there any way to know what platform the current OA session is running on? To be able to differentiate between a "android tablet" and a "windows desktop PC".

Of the User administration functions, it seems that most are implemented under both Linux and Windows. But they don't work on the android app.

Is there any way to do this?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Detect current platform

Post by leoknipp »

Hello,

there are some CTRL constants available to get the platform information.
E.g. _UNIX, _WIN32.
The constant VERSION_PLATFORM returns as string also platform information.

You can have a look at the about.pnl in the WinCC OA version. There are some constants used.

Best Regards
Leopold Knipp
Senior Support Specialist

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Detect current platform

Post by mkoller »

You can use getApplicationProperty("platformName") which returns a string: "android" or "ios" on the mobile devices.
In the next 3.14 patch there will also be the CTRL constants _ANDROID and _IOS

Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Re: Detect current platform

Post by Dag-Are.Trydal@nov.com »

Thank you both for your great response. This is what I needed.

4 posts • Page 1 of 1