That's difficult, without openness or protectionism. How do you compete with iOS without supporting iOS apps, iCloud, and iMessage blue bubbles? The switching costs (practical, and psychological) are too high.
Ask Microsoft, who tried developing Windows Mobile after the market was taken over by iOS and Android. Or who still tries competing with Chrome without much success, despite it being pushed on Windows as the default, with annoying settings and ads included. Nevermind that they gave up developing their own engine because they couldn't keep up.
Microsoft has been doing various flavors of mobile OS development since LONG before iOS or Android. The first release of Windows CE was back in 1996, roughly contemporary with PalmOS and Apple's NewtonOS.
Android isn't competing with iOS. Apple users stay Apple users, mostly, and Android users stay Android users. Android manufacturers are competing with each other, but iPhones are their own thing.
I'm an "Apple user" that switched from iPhone/iPad/Apple Watch to Android alternatives; while remaining a happy user of Macbooks.
The statement doesn't make sense because people don't keep 2 phones in their pocket, or 2 smart watches, and rarely have 2 tablets that are actively used. And people definitely move between ecosystems. Choosing one excludes the other, and they have equivalents for each product type.
Hence they are direct competitors.
---
The real problem is that the mobile OS & app store market is a stable duopoly.
You build good alternatives for each of those.