How do I Detect Device Name?

Get help using Construct 2

Post » Tue May 12, 2015 3:43 pm

Hy there , as title says, is there a way to grab the Device name and use it in a Text object?
Example

On start of layout : Is on mobile : set text to " Mobile Detected " & newline & Device Name ? something like this i mean i already have the code detecting za mobile or za desktop/browser.

Now my question is how to tap into the users device and get the model of the device! like intel pentium / Acer mobile, sony , playstation etc?
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,025

Post » Tue May 12, 2015 3:53 pm

I'm not sure if it will work, but the browser-object has the expression UserAgent.

Set text to browser.UserAgent is the only available native way..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue May 12, 2015 7:30 pm

let me try that an get back :D


huh was pocking around browser object :D and found what i needed its not user agent, user agent works but give to much info


"Mobile Detected"&newline&Browser.Version however the version control is doing exactly what i needed ! gives u the device name and browser Version 5.0 etc :D @LittleStain thanks
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,025


Return to How do I....?

Who is online

Users browsing this forum: babymumu and 8 guests