For years, I believed that BlackBerry Ltd.  (TSX:BB)(NASDAQ:BBRY) was going to fail. It had lost its superior market share to the iOS and Android worlds, no one other than dedicated followers were buying the phones, and it was burning through billions of dollars.

However, despite numerous attempts by Wall Street to finally put this company to rest, BlackBerry has survived. It has struggled, but it has slowly turned things around. I would argue that things are actually starting to look up.

Strong third quarter

The first thing to consider is that the company had a stronger-than-expected third quarter. Analysts had expected the company to make US$489 million in revenue, but instead the company made US$557 million. This meant that the loss was only US$0.03 per share rather than the expected US$0.15.

There were two driving factors for this. The first is obviously the hardware division. While it only sold 700,000 in the third quarter compared to 800,000 in the second, its average selling price was greater in the third quarter than the second. In the second quarter it made $240 per device. In the third quarter it made $315 per device.

On the software side, it has seen tremendous growth. In the second quarter this division brought in US$78 million. In the third quarter it brought in US$154 million in revenue. The company signed up an additional 2,713 enterprise customers in part because of its acquisitions of AtHoc and Good Technology.

More Android phones

At the Consumer Electronics Show this year, CEO John Chen announced that it would be releasing one or two more Android phones this year. Investors obviously hate this, but I believe there is potential for BlackBerry to be the secure Android provider for the market.

We’ll have to wait until the end of the fourth quarter to get a better idea on how the phone market is doing, but Chen has said if the company doesn’t sell five million handsets, it will stop selling phones because that’s the number it needs to reach profitability.

Investors want BlackBerry to stop making hardware, so it can focus entirely on software. While that has been my belief for some time, I’ve also argued that being a provider of secure Android devices would be a smart way to niche the company.

IoT

But the real bread and butter, in my opinion, is with BlackBerry’s QNX operating system, which is targeted toward the Internet of Things (IoT). Already, this software is being used in Ford cars, which allows the car to be securely connected to the Internet.

What’s exciting for BlackBerry is that it is trying to get into a market that could be worth US$1.7 trillion by 2020. BlackBerry is known for its security; therefore, as new applications come out I expect BlackBerry to have a strong chance of being implemented in the IoT.

All told, I believe that BlackBerry still has some risks associated with it. However, if the company has an equally strong fourth quarter and success with its Android phones, plus with its roll out of IoT products, I believe BlackBerry could have a very bright future. I believe a small position that scales with good news is the way to play this stock.

Just released! One top stock for 2106 and beyond

Exports of liquefied natural gas could be one of the best growth opportunities out there for long-term investors. And, we think we've identified the Canadian company to invest in. It's a global company with operations across nearly 20 countries and 70 locations. We like it so much, we've named it as 1 Top Stock for 2016 and Beyond. To find out why, click here now to learn how to access your FREE copy today!

Fool contributor Jacob Donnelly has no position in any stocks mentioned. David Gardner owns shares of Ford.