Getting device info like OS, version, screen size and resolution?

leogallardo

  • *
  • Posts: 28
Hi guys, is there a way to get device info like OS, version, screen size and resolution, I'd like to implement a user feedback feature using either email or webview, and for any of those options I need to send  the specs of the device as a GET variable, so the user doesn't have to fill those.

Is there a way to accomplish this?

Max Finch

  • *
  • Posts: 2174
There's an extension to get the device model, device name, and device operating system for Android.
http://community.stencyl.com/index.php/topic,23285.0.html

In order to get the device screen size you'll need to use
nme.system.Capabilities.screenResolutionX

and

nme.system.Capabilities.screenResolutionY

Keep in mind it doesn't include the Android navigation bar which is 48 DP. And I don't know how to get the device DP in order to find the Nav bar height of the specified device.


For windows I'm not sure what you'd need to do. You can still get screen size by the above suggestion but I don't know about OS and stuff like that.

leogallardo

  • *
  • Posts: 28
Thank you very much Max! I just took a look at the Android Utils link you sent me, they look really cool! I'll implement those in my app without a doubt.

:)