Since notch area detection hasn't been working for years does anyone have any tips for designing mobile games when we don't know how much space notch takes up?
u can't detect the notch usually at top... for 1 reason... the screen is actually a rectangle... or square or whatever... it doesn't need to have a "code" that measures the middle hole or the camera overlay on top. think of it as a "workaround" solution but for hardware. so since the hardware is a rectangle and the code says is a rectangle there isn't much u can do code wise or detection wise... what u can do is adapt ur content and don't put important things to display in a 50-100 pixel distance where the notch is... so lets say u got a topheader with coins info etc... move it a bit downward... and that is that. for example i got a motog8plus has front camera straigh in middle top... all software/apps i have installed have the "breadcrumbs" info on left and right of it... nothing in middle. now problem will be when u have mobile phones with front camera in left or right... but then again those have to be "manually" declared in ur GUI code. and basically have 3-5 sets of positions for ur content based on the device loaded.
depends which phones notch u trying to adapt ur code for or graphics. there are a pletora of devices some weirder than others... not to mention the folding ones nowadays or the 4 screens front and back... ufff... u can however detect the edge of screen... which usually is at the very edge visible of the hardware screen. so based on that u can add or subtract spacing.