TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Resolved Questions
→
Getting device info like OS, version, screen size and resolution?
Pages:
1
Getting device info like OS, version, screen size and resolution?
leogallardo
Posts: 28
September 14, 2014, 02:03:22 pm
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
September 17, 2014, 09:40:35 pm
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
October 04, 2014, 12:20:56 pm
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.
Pages:
1