How to detect mobile device?

0 favourites
  • 5 posts
From the Asset Store
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • I want to know how to detect mobile device?I found a post about this,it said that I can use the function 'Is On Mobile Device' in the object Browser.But I can't see this condition in Browser.Anyone can help me?Thank you so much.

  • You should take a look at the Browser object's platform expression:

    https://www.scirra.com/manual/110/browser

  • who told you [/code:xkav2m74] the expression is on browser object?
    (rephrased : what post told you that @KKdenis ?)
    
    the expression "Is on mobile device" or "is on platform " and u select the platform from the dropdown menu its found in the [url=https://www.scirra.com/manual/124/system-conditions]System expression list[/url].
    
    yes the "is on mobile" can be detected by using the browser object however its not required unless u need a specific mobile device to be detected, for example u want to lock ur game to be played only on ipad4 or samsung galaxy S what ever... but i doubt u want that.
    
    care to mention that the browser object has mobile expression such as detecting if the mobile button back or the arrow that is inscriptioned on the devices as an arrow ( < >), same applies to menu buttons and others that can be found on most smartphones(outside iPhone which has only 1 button i think.)
    
    i suggest either read the manual, or if that makes u confused, go trough the entire example files C2 comes with... you will learn faster that way the basics.
  • Yes, you are right. The browser object's platform expression returns the OS it's running on. My mistake.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you are right. The browser object's platform expression returns the OS it's running on. My mistake.

    oh no, i was asking the OP not you dear friend, but i was thinking someone told him that, then read it again, and i see the confusion, however the question i did, sounded a bit high-demanding sorry for that. you where right also though.

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