1237
Views
22
Comments
Solved
Detect Android or iOS
Question

How can I detect if a phone is android or iOS?  Seems like I've seen a method somewhere but I don't know where it is.


Thanks.

mvp_badge
MVP
Rank: #5
Solution

Hi Daniel,

In the WebPatterns you can use the action CurrentOS to identify the device OS :)

Cheers,
Eduardo Jauch

mvp_badge
MVP
Rank: #5

You're welcome, Mr. Daniel ;)

Rank: #18071

Can someone perhaps tell me in which module?   

BTW: Seems a bit odd naming: WebPatterns for a mobile OS. 

Hence the remark of "..was looking at MobilePatterns".

Rank: #5108

Hi, I was unable to fin the Web Patterns in forge. Has something changed since this was answered?

I raise this here again because its the first page that comes up when you ask google..

mvp_badge
MVP
Rank: #5

Hi Anthny.

Web Patterns is part of Silk UI (so, if you are working with Silk UI, it should be available from the start).
If you are using OutSystems UI new framework (O11), it is under OutSystemsWebUI:

Cheers.

Rank: #20525

Hi there,

I've tried to use the DeviceDetection components with PWA, but these do not seem to work with PWA? I had to revert to my own JS. Anyone else perhaps having the same issue?

Staff
Rank: #9

Have you tried updating OutSystems UI to the latest version?

Please note the screenshot you have is from OutSystems UI Web - which is not for PWA. You should be building a mobile application with OutSystems UI (not Web)

mvp_badge
MVP
Rank: #71

Hi Deddy,

For Native Mobile you could use the GetPlatform action from the CommonPlugin. It should return whether the platform is iOS or Android.

Regards,

Nordin

Rank: #20525

Hi Nordin - I tried both 'GetPlatform' and 'GetOperatingSystem' (Commonplugin) in PWA but this does not return results. Must be a PWA limitation? 

Deddi - would be good to hear if this works in Native Mobile?

Thx for your replies :)

Leon

 

Rank: #5318

Hi, I am trying to use these device detection client actions from OutsystemsUI in a reactive web app, but they do not return a value. I am putting "" into the UserAgent parameter, because I have no clue what else to input.

I have OutSystemsUI version 2.5.8

Staff
Rank: #40264

Hello.

Please do the following:

Hope this helps.

Best regards.

Rank: #79609

I've attempted to utilize the DeviceDetection segments with PWA, yet these don't appear to work with PWA? I needed to return to my own JS. Any other person maybe having a similar issue?