If you write a generic App, you run the risk of Apple or Google competing with you. But if you can take your App and include unique features, you might be Ok. Camera Apps are a good example. Apple and Google have their own default Camera Apps. But there are many Camera Apps that are both better and different. Apple did take the flashlight App idea, and they took the Bump phones together for file sharing idea. Those Apps are now toast.
So the trick is to create an App that is both universal and also unique enough that it would make no sense for Apple or Google to compete with you. These giants will not change their entire business model to compete with a unique App that is not a common tool. Famous last words.
Let's look at Augmented Reality. Currently, 7% of all AR Apps are length measuring Apps. This is according to Sensor Tower, an analytics outfit. We have all these measuring Apps because every tutorial on AR coding includes a measuring example. There's over 2 million downloads of 80 or so measuring Apps.
This brings us to Apple Measure, the new standard in AR measuring. There are competitors like AR MeasureKit. But those could soon become obsolete. So what is so great about Apple Measure? It helps you accurately measure objects or walls and it is free. But it's not available until IOS 12.