0

I've looked through the official documentation on the Tabris site, but I've not yet found an answer. So, within a Tabris app, how does one determine the current OS its running within?

Specifically, I'd like to be able to detect Android or iOS.

Edit

I found this example on their site after @Holger posted the answer, I'm pasting here to help others:

var page = tabris.create("Page", {
  title: "Device Info",
  topLevel: true
});

["platform", "version", "model",  "language"].forEach(function(property) {
  tabris.create("TextView", {
    layoutData: {left: 10, right: 10, top: [page.children().last(), 10]},
    text: property + ": " + device[property]
  }).appendTo(page);
});

page.open();
Paul Gregoire
  • 9,715
  • 11
  • 67
  • 131
  • The example code you posted is from tabris.js. So if you want to get the os of the device in tabris.js you would use: https://tabrisjs.com/documentation/device – Moritz Mar 02 '15 at 09:23

1 Answers1

1

There is a Client Service called "ClientDevice". You can ge tthe platform, os version and so on form it. See http://developer.eclipsesource.com/tabris/docs/1.4/working/client-services/client-device#the_clients_platform

Holger
  • 437
  • 2
  • 4