RT_PREEMPT is very much capable of real-time applications. Outside of control loops faster than a couple kHz, it's even suitable for hard real-time applications.
But those issues aren't fixed with Linux, but rather with CPUs design for hard real-time usage.
Industry seems to think otherwise.
That still isn't a match for something like INTEGRITY OS, vxWorks, QNX when human lives are at risk.
Or why despite using an heavily modified Linux kernel as basis for Azure Sphere, Microsoft rather advocates Azure RTOS for real time tasks.
https://techcommunity.microsoft.com/t5/internet-of-things/co...
Or why the Linux Foundation, ironically pushes Zephyr for such purposes, completely unrelated to Linux source code.
If Linux with PREEMPT_RT is unsuitable, all the modern x86 CPUs with system management mode interrupts are even worse. Because those are the worst and primary cause for that Linux being insufficient for control loops in the 10's of kHz.
Yes, Android runs on Linux, yet that is 100% meaningless for app developers targeting Android.
Web developers don't care about what OS the browser is running on.
Native Android developers have a Java Framework and Kotlin libraries to work with, which are completely unrelated to Linux.
However they also have the NDK, one would say. Yes, indeed.
So what are the public APIs?
https://developer.android.com/ndk/guides/stable_apis
And recent versions will kill apps that try to be clever and access private APIs,
https://android-developers.googleblog.com/2016/06/android-ch...
https://android-developers.googleblog.com/2017/07/seccomp-fi...
As for automotive, while Automotive Grade Linux is getting some love, it is still not an option for real time requirements.