• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Detecting Ipad mini versus Ipad

Community Beginner ,
Jul 01, 2013 Jul 01, 2013

Copy link to clipboard

Copied

Dear developers, via as3 code I am trying to tell the difference between ipad mini and ipad.  I would like to make the buttons a bit larger on the mini, as when it is shrunk down they are just a bit too small on the mini.

So I am using this code

var resX:int = Capabilities.screenResolutionX;
var resY:int = Capabilities.screenResolutionY;
var tabdpi:int=Capabilities.screenDPI;

and publishing ad hoc directly to the ipad mini.  I am using flash pro cs6.

resX and resY are correct, but screenDPI returns 132 instead of 163 (from within the app on the mini).  I was reading on another website that there is no way to tell the two devices apart, and that this is the way apple wants it.  Has anyone found a solution to this problem?

I could make the buttons larger for the Ipad and then they would be an adequate size for the mini, but this solution seems inelegant.

Thank you,

Justin

TOPICS
Development

Views

2.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Jul 01, 2013 Jul 01, 2013

Technically possible, but a little fragile and subject to future breakage if you don't say on top of new hardware releases...

Adobe currently includes the iOS device hardware string inside the Capabilities.os string.

This will include an internal hardware string reported by iOS,

You can find classes and code that list these, like

https://github.com/mikezang/UIDevice-Hardware

So currently you could distinguish an iPad mini from an iPad 2 by searching in Capabilities.os for:

iPad2,5

iPad2,6

iPad2,7

but if

...

Votes

Translate

Translate
Engaged ,
Jul 01, 2013 Jul 01, 2013

Copy link to clipboard

Copied

Technically possible, but a little fragile and subject to future breakage if you don't say on top of new hardware releases...

Adobe currently includes the iOS device hardware string inside the Capabilities.os string.

This will include an internal hardware string reported by iOS,

You can find classes and code that list these, like

https://github.com/mikezang/UIDevice-Hardware

So currently you could distinguish an iPad mini from an iPad 2 by searching in Capabilities.os for:

iPad2,5

iPad2,6

iPad2,7

but if new versions of iPad mini are released you will have to update your code.

As you mention, Apple would discourage distinguishing the difference in possibly all circumstances though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 01, 2013 Jul 01, 2013

Copy link to clipboard

Copied

Dear Jeffrey, thank you for your response.  I checked out the link and will try to implement this solution.  The touch area for the button works on the mini.... but on a larger screen (Samsung 10.1), there is never a miss....on the ipad mini, misses occur probably 1 out of 8-10 times....not acceptable as the button pauses the game and gives the user some other options (like sound control, go back to main menu and replay the level).  I find users are quick to judge, and if an important button isn't working all the time.....it could be judged harshly.

Thank you,

Justin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

Just to update this thread if you are using this technique, with the introduction of the new iPad mini retina hardware there are new mini versions for the retina version reported by Capabilities.os:

iPad4,4

iPad4,5

Granted these will be retina resolution devices, but in the end if you want the button sizes to compensate you would possibly want to tweak the overall touch area on these retina versions of mini too.

Device hardware naming convention info from:

http://www.iclarified.com/entry/index.php?enid=8500

Jeff

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 01, 2013 Nov 01, 2013

Copy link to clipboard

Copied

LATEST

You could also check the device's physical size, with something like this: Math.max( mc.stage.fullScreenWidth , mc.stage.fullScreenHeight ) / Capabilities.screenDPI .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines