Get platform during runtime?

Hey,

I looked all over for this and couldn’t find it, sorry if it’s a dumb question, but how do you get the platform name (iPhone, iPad, Android) during runtime?

Thanks in advance,
~David [import]uid: 6678 topic_id: 1262 reply_id: 301262[/import]

Not possible atm and it was already asked for. [import]uid: 5712 topic_id: 1262 reply_id: 3347[/import]

Best workaround seems to check the display size and making assumptions. Will be a problem if you use the automatic scaling… Missing this information too. [import]uid: 6928 topic_id: 1262 reply_id: 3351[/import]

For now I just use a global variable, which i set before i build for the device.

[lua]local android, iphone, ipad = 1,2,3
local buildFor = android
–…
if buildFor == android then
–…
end
[lua] [import]uid: 5712 topic_id: 1262 reply_id: 3354[/import]

Thanks for the the information guys. Mike, I think that’s the best way now. OderWat, it was a good idea, but you can’t really check the display size and use that. For example, my Android phone, the Samsung Moment, has the same screen dimensions as the iPhone/iPod Touch (320x480). [import]uid: 6678 topic_id: 1262 reply_id: 3368[/import]

@DFox

Yeah… for my app would that mean it is an “identical device” because all I wanted was to adjust the “centering” of the scaled viewport for different builds and devices!

To ask a maybe dumb question: How many resolutions and more important Screen Ratios are there for Android!? [import]uid: 6928 topic_id: 1262 reply_id: 3371[/import]