[TIMOB-5547] MobileWeb: Ti.Platform.model returns null
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2011-06-10T05:38:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Misha Vasko |
Assignee | Maxim Negadaylov |
Created | 2011-06-10T04:17:37.000+0000 |
Updated | 2017-03-10T18:53:53.000+0000 |
Description
Property Ti.Platform.model returns null on iPhone. It have to return the model of the phone.
var win = Titanium.UI.currentWindow;
win.backgroundColor = '#EEE';
var show = Ti.UI.createButton({
title: 'Show',
left: 90,
top: 10,
width: 140,
height: 45,
fontSize: 20
});
var close = Ti.UI.createButton({
title: 'Close',
left: 90,
top: 60,
width: 140,
height: 45,
fontSize: 20
});
var ta = Ti.UI.createTextArea({
top: 110,
left: 10,
width: 300,
height: 180,
backgroundColor: 'white',
fontSize: 18
});
win.add(show);
win.add(close);
win.add(ta);
close.addEventListener('click', function(){
Titanium.UI.currentWindow.close();
});
show.addEventListener('click',function(){
ta.value = 'Operation system: ' + Ti.Platform.osname + '\r\n';
ta.value = ta.value + 'OS type: ' + Ti.Platform.ostype + '\r\n';
ta.value = ta.value + 'Platform name: ' + Ti.Platform.name + '\r\n';
ta.value = ta.value + 'Window height: ' + Ti.Platform.displayCaps.platformHeight + '\r\n';
ta.value = ta.value + 'Window width: ' + Ti.Platform.displayCaps.platformWidth + '\r\n';
ta.value = ta.value + 'Platform model: ' + Ti.Platform.model + '\r\n';
});
We can't know phone model in a browser
Closing ticket as the issue will not fix.