Windows Phone could have been a viable competitor...
I say this even though I've been watching Microsoft bungle things since Windows CE first appeared in the 1990s. I'm not sure why I continued to hold out hope, every time, that things would be different the next time around.
It happened that I came across a Lumia 640 in the closeout department of a store. It seemed to me that it was probably worth taking the chance for ten bucks, and it'd have the honor of being the first smartphone I ever owned.
Windows Mobile 8.1 ran well on it. Apart from a few rough edges (mostly around the mail client), it was a well thought out operating system. They even thought to include R(B)DS decoding in the FM tuner application. I was impressed enough that there was an FM radio tuner application! Most of the applications available came from very small time developers, who clearly cared about the platform and their work. Three in particular stand out: A really well done GPS speedometer that is to date the only "app" on any platform that I've ever thought enough of to have purchased, Metrotube from Lazy Worm Apps and a bar code scanner whose name I have forgotten. (I'd go and look up the names for the speedometer and bar code scanner apps, but the phone is hiding out in the basement and that's just not happening at this hour.) There was an easily removable battery, headphone jack, and even a place to pop in a Micro SD card (which I did). The phone itself felt very solid and quite well made. It had excellent audio when receiving calls.
(Microsoft released a "port" of DOS for Windows Phone as an April Fools Day joke. I still find it fairly amusing to play around with.)
Was it all perfect? No. Although its audio was excellent when recording video (something Apple in particular could pay attention to), the camera was pretty mediocre. Few of the major application developers ever bothered to make a Windows Phone version of their software and fewer still ever updated their software. I thought it nothing short of miraculous that a WP version of Shazam existed. (It's never been updated that I can see, but as of a few months ago, it still mostly worked.) Every now and again, the software would lose track of certain hardware functions and a restart would be necessary. In other places, the user interface was confusing. I always had to fiddle around a bit before I could find any updates to my installed apps. More and more websites refused to cope gracefully (or at all) with Internet Explorer.
I'd probably still be using the Lumia 640 had it not taken the opportunity to disappear one day. Microsoft's locator service placed it near a major highway, and I took it at face value, figuring that I'd foolishly left the phone somewhere on the outside of my vehicle and it had blown away, never to be seen again. It was about this time, much to my great disgust, that I discovered the carrier had put some sort of worthless insurance on the phone's service plan. I tried and failed to collect any benefit because I had to produce at least a piece of the phone before they'd replace it. Some months later, an iPhone SE replaced it. I probably would have never thought any more of it, but the Lumia 640 later surfaced in a stack of winter clothing.
I shunned Windows 10 Phone when the thing was in active use because I didn't (still don't) care at all for Windows 10 on desktops or tablets. Since it didn't seem likely to bother me now -- and who knows, in enough time, the avenue for an upgrade might not exist -- I went ahead and let the thing upgrade itself. It wasn't exactly flawless, in that my e-mail configurations were tossed right out the window. A few apps disappeared and others lost their configurations. I've never actually gotten any of my e-mail accounts to work with the new system. The new OS really is rather sluggish on the Lumia 640's hardware. I'm sure that just like its PC related brethren, that it slurps as much data as it possibly can, with or without permission.
I do think that if Microsoft had sanded down some of the rough edges, and really pushed to get developers interested in the platform, that Windows Phone could have been a success. In a way, it's sad to think that it's just another historical footnote, steamrolled into irrelevance by Microsoft's continued incompetence and the duopoly of Android and iPhone.
(For whatever it's worth, I utterly despise Android. Amongst many other things, it's a great study in how not to implement user interfaces.)