It would be ugly from a user point of view, but you could hide the title bar and then show it again and compute the difference in height of the Screen, I think.
Hmm, interesting. I have three Pixel devices (running Android 11, 13, and 16). The navigation bar height is 48 dp on A11, and 24 dp on both A13 and A16. So, an extension is needed to query the correct height.
While it might theoretically be possible to do this without an extension, it would hardly make sense within an app to use a timer to temporarily show and hide the system bars.
Since AI2—unlike Niotron and Kodular—lacks a method for hiding the navbar, it would likely be virtually impossible to calculate the correct navbar height without an extension unless the actual screen height is known. It would be worth investigating whether the screen height could potentially be retrieved from an online database.
However, it is odd that AI2 allows the ActionBar and StatusBar to be hidden, but not the Navbar.