Can i check, if iam on ipad or iphone?

Get help using Construct 2

Post » Mon Jun 12, 2017 6:57 am

Hello!

My question is: Is it possible to check, which device is used? I need to check if its ipad or iphone, because the ios api seems to be differend on both devices.

(On the iPad embedded videos in construct2 can be triggered with my own sprite - thats pretty cool, but on iphone there is no chance to play it trough the "start" sprite, like on ipads...thats pretty bad - so i would need to check, if the user is playing the app with an iphone or ipad to change the code, depending on their device. On Iphone the videos have their own play button, so my sprites, would be ignored and above the video (because its for ipads too) - thats a weird paradox problem)

If no one has a solution...i think i would try to check the screen height and the screen width and calculate the ratio (iphones often have a 16:9 format and ipads 4:3).... i hope this would work.

But iam very happy about any information from you, probably there is a "more safe" solution, because iam not sure if the get windowHeight/windowWidth from construct2 will check the device wH/wW.

Thank you very much.
B
9
S
2
Posts: 147
Reputation: 1,041

Post » Tue Jun 13, 2017 4:52 pm

I would do it with screenHeight/Width.

or you can try: http://blog.marko-kastelec.com/2015/09/ ... avascript/
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Tue Jun 13, 2017 5:14 pm

@gumshoe2029

I did it with WindowHeight/WindowWidth and it works perfectly!
B
9
S
2
Posts: 147
Reputation: 1,041


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, jbr190 and 37 guests