Reputation: 9793
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();
Upvotes: 0
Views: 70
Reputation: 447
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
Upvotes: 1