[r182] Internet Explorer detected as mobile platform

0 favourites
  • 5 posts
From the Asset Store
A complete set of tiny sprites and tiles for your retro platformer game.
  • 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

  • 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.

  • 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 ) ?

  • 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.

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)