Any way to run different events for phones and tablets?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

  • I need to alter some object's positions depending on whether it's running on a tablet or phone.

    I've successfully done this for the iOS version of my app by getting the device model and doing one thing for phones and a different thing for tablets. But with so many different Android devices on the market that doesn'tt seem practical here. Is there a tried and tested way of doing this or do I need to try to get something working by looking at the screen height to width ratio (presumably while taking its orientation into account)?


  • The 'special' object (gear icon) has a condition that lets you detect the runtime

    Please login to see this picture.

    edit: oh, I just reread your post and realised I misinterpreted your question as detecting if the device is iOS or android, sorry!

  • Use window control extension. It can get device screen width and height.

    Calculate screen ratio "(screen width*1.0)/screen height"

    And that's it. You now can divide devices by screen ratio. I'd say 1.78 is divider (16:9 most probably tablet or very old phone). The lower number means it's tablet, the higher is phone. The most easiest way.

  • Thanks for your help guys.

    marbenx: Yeah it was a little confusing. I saw the edit before I tried anything, so no harm done.

    Ikko: I'll give that a go. But I think I can get the window height and width using the built-in default features, so I'm not sure if the Window Control object is needed. I'll try it and update this post.

  • The Android Plus object has a built-in command:

    * AndroidPlus: Is Device a tablet? [I used to use it, and it worked 100% in recognising a tablet.]

    It also lets you adjust the view based on that.

    You might need Fusion Developer to get the Android Plus object.

    Casual games: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!