[r182] Internet Explorer detected as mobile platform

Bugs will be moved here once resolved.

Post » Mon Sep 29, 2014 11:12 am

Problem Description
When I test game on IE, construct 2 return true on "is on mobile device" condition.

Attach a Capx
https://www.dropbox.com/s/8q9agafqymy3h ... .capx?dl=0

Description of Capx
This capx does only one thing - set text object text to "mobile", if "is on mobile device" condition is true, and "not mobile" if it's false.

Steps to Reproduce Bug
  • Create empty project
  • set default browser to Internet Explorer
  • Put text object on layout
  • make event with "is on mobile device" condition and set action to "set text to"mobile"" (related to created text object)
  • create "else" condition and set action to "set text to "not mobile"" ( related to created text object )

Observed Result
Text object shows "mobile" on desktop IE, and "not mobile" on every

Expected Result
Text object should show "not mobile" on desktop IE

Affected Browsers
  • Chrome: (NO)
  • FireFox: (NO)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8.1 x64

Construct 2 Version ID
r182 x64
B
22
S
3
G
2
Posts: 30
Reputation: 3,693

Post » Mon Sep 29, 2014 11:32 am

http://answers.microsoft.com/en-us/ie/f ... e7e04a0642 maybe related.


Also I would suggest not using the "is on mobile device" check, as it can be annoying for a lot of users, is unreliable, and will be countered in only a few options of mobile browsers (exemple of unreliable: android is always considered mobile regardless of the device running it I think), and also means you are doing things differently just based on the fact it may be a mobile, which is kind of unfair for anyone unless you provide a way to access both versions regardeless of the device.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Sep 29, 2014 12:48 pm

Ok I see and I know there is no clear boundary between mobile and not-mobile devices nowadays (as you suggest, Android for example can be installed on anything ). In my case, I just want to check if application is running on device with touch interface only... but now I see it's not really necessary ;)
out of curiosity - is there any way to be sure user's playing game on his phone, not pc ( let's say, for achievements assigning purpose ) ?
B
22
S
3
G
2
Posts: 30
Reputation: 3,693

Post » Mon Sep 29, 2014 1:37 pm

Can't reproduce, IE11 on Windows 8.1 here says "not mobile". Detection is based on keywords in the user agent string and my best guess is you have a browser addon that adds one of these keywords to the user agent.

stachir wrote:out of curiosity - is there any way to be sure user's playing game on his phone, not pc ( let's say, for achievements assigning purpose ) ?

Basically, no. The mobile detection checks for keywords like "mobile" as well as a few well-known platforms like "android" and "ios". As the condition description says itself it's an estimate and not perfectly accurate. Part of the problem is "mobile" is not a well-defined term anyway. Is a laptop "mobile" because you can pick it up and walk around with it? What about the Surface Pro laptop/tablet hybrid? What about tablets? What about an Android phone using an external monitor with a keyboard and mouse plugged in? etc.
Scirra Founder
B
397
S
236
G
88
Posts: 24,412
Reputation: 194,514

Post » Mon Sep 29, 2014 1:41 pm

There is no bulletproof way, however if it is only for touchscreen purpose, you can have the player having to click/touch a button in the main menu in order to know which input is used (this will not work well on the stock android browser though which triggers both types of inputs on touch).

For achievements and such, I am not sure why you would need different achievements, but I would base them on inputs still if really needed (as even some people may use gamepad or keyboard or mouse on a phone compatible with them, and some desktops have also touchscreen)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron