lrs_coolik
lrs_coolik

Reputation: 81

Movilizer - get information whether device is a Smartphone or Tablet

In use of getClientType() I can get the information which kind of platform the user is currently using/working on. For appearance purposes in a Movelet I'd like to distinguish whether the end user is using a smartphone or a tablet, can I achieve this somehow?

Upvotes: 0

Views: 54

Answers (1)

the right way to go would be to call getClientType to figure out the platform first. Then call:

numeric getComplexUIMode() 

Return values are:

  • 0 for COMPLEX_UI_SUPPORT_NONE, no complex supported
  • 1 for COMPLEX_UI_SUPPORT_LINEAR, only linear supported indicating a smartphone
  • 2 for COMPLEX_UI_SUPPORT_GRID, linear and grid supported indicating a tablet

This method is availabe since MEL v7 ... so it can be used on 2.1 Movilizer Clients and above.

With both the platform and the supported UI mode you should be able to figure out if you are running on an Android tablet or an iOS smartphone ...

Upvotes: 0

Related Questions