Identify if user is using IOS or Android devices to access application

Identify if user is using IOS or Android devices to access application

  

How can we identify programatically that a user is openning application from an android or ios device?
Solution
Hi Carlos,

If you're using Silk UI, there's an action in module SilkUIFramework called CurrentOS that will return a string with the current Operating System.
If you're not using Silk UI, you can do it by the user agent:
  • ios
    Index(UserAgent,"ipad")>-1 or Index(UserAgent,"iphone")>-1 or Index(UserAgent,"ipod")>-1
  • Android
    Index(UserAgent,"android")>-1
If you're using OutSystems Now or a cordova wrapper, you can do:
cordova.platformID
That will return a string with the operating system.

Let me know if this helps.

Cheers,

RG

Solution

Perfect. It was exactly what we needed. Thanks a lot.