Search Unity

How to check if the Android device has a notch?

Discussion in 'General Discussion' started by the_Bad_Brad, Oct 17, 2018.

Thread Status:
Not open for further replies.
  1. the_Bad_Brad

    the_Bad_Brad

    Joined:
    Nov 2, 2014
    Posts:
    278
    I have a side menu bars in my game and I want the orientation to flip when the game is run on a notched android device.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    Can't you just ignore the notch like most iOS devs do and just draw a black bar over it?
     
    hippocoder likes this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,796
    It is, but only on Android P and once even no-name phones start having notches, who knows if it's going to return proper values.
     
  5. the_Bad_Brad

    the_Bad_Brad

    Joined:
    Nov 2, 2014
    Posts:
    278
    My temporary solution is add a screen flip option in the settings me.
     
  6. ammirea

    ammirea

    Joined:
    Oct 22, 2018
    Posts:
    8
    I wonder if in the not-so-distant future they're going to make heart-shaped or 5 petal flowered screens...
    Oh, and what about those devices with selfie cameras islands thrown in some odd part of the screen? Seriously now.
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    My Galaxy S10+ has this. Selfie camera is contained within the screen instead of a notch. Viewable screen all the way around it.
     
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    Hear me out, but what if we just made the screen a solid rectangle
     
    JJVelazquez, sj631 and Ryiah like this.
Thread Status:
Not open for further replies.