Jump to content


Detecting Browser/ Operating System/ Mobile Device

android ios iphone windows phone blackberry safari ie chrome browser ipad

  • Please log in to reply
2 replies to this topic


  • Members
  • 44 posts

Posted 09 March 2015 - 07:53 AM

I'm looking for simple SMARTMS code to detect the browser, operating system and device - to be used in a multi-platform mobile app.

  • Jørn E. Angeltveit likes this

#2 Jørn E. Angeltveit

Jørn E. Angeltveit
  • Administrators
  • 297 posts
  • LocationNorway

Posted 09 March 2015 - 12:09 PM

You have a bunch of routines in SmartCL.System:



function w3_getIsIPad: Boolean;
function w3_getIsIPhone: Boolean;
function w3_getIsIPod: Boolean;
function w3_getIsAndroid: Boolean;
function w3_getIsSafari: Boolean;
function w3_getIsFirefox: Boolean;
function w3_getIsChrome: Boolean;
function w3_getIsInternetExplorer: Boolean;
function w3_getIsOpera: Boolean;
function w3_getIsMobile: Boolean;

#3 Cipher Diaz

Cipher Diaz
  • Administrators
  • 313 posts

Posted 09 March 2015 - 07:14 PM

Jørn has listed some functions (or all the functions), but if you write "browserAPI" and then CTRL+Click on that, it will take you to the driver classes. On startup SMS does an extensive test of what environment it is running on and create a "driver" class. The driver is in charge of prefix and postfix (e.g "moz" vs. "webkit" vs. "oo" etc..) of tags.


If you are looking for a way to determine what browser is used, because you want to prefix or postfix tag -- then you can just use the functions of the current browserAPI function.

  • Jørn E. Angeltveit likes this

Also tagged with one or more of these keywords: android, ios, iphone, windows phone, blackberry, safari, ie, chrome, browser, ipad

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users