Former smartphone giant BlackBerry (BB -0.69%) has turned its business around by shifting focus to selling software and services in place of handheld devices. The company has been rapidly reducing its reliance on the legacy smartphone business by moving into the lucrative world of providing software in fast-growing industries such as automotive.

With this turnaround, it won't be long before BlackBerry's revenue and earnings start growing once again.

The legacy businesses are almost done with

BlackBerry's recent fourth-quarter results give us a closer look at the progress the company is making. The top line fell almost 19% year over year to $239 million, but this was an improvement from the 27% decline Wall Street expected. The revenue shortfall was driven by the lower contribution from its handheld devices and service access fee (SAF) businesses. These two segments together supplied just $21 million in revenue last quarter, down almost 80% from the prior-year period.

A BlackBerry KeyOne smartphone

Image source: BlackBerry. 

They now account for less than 9% of BlackBerry's total revenue as compared to 35% in the year-ago quarter. In fact, the company sold just $2 million worth of smartphones last quarter and generated $19 million in service access fees generated by the company on the provision of monthly services to users of its smartphone platform.

Software sales have gained terrific traction

Meanwhile, BlackBerry's software and services revenue hit a record $218 million last quarter, an increase of almost 13% from the same period last year. That's more than 90% of total revenue, and 70% of the revenue from this segment is recurring in nature.

More importantly, BlackBerry's software solutions are gaining improved end-market traction. The company's enterprise customer base grew from 3,000 at the end of the third quarter to 3,500 customers during the fourth, which isn't surprising as BlackBerry has struck multiple partnerships with key players and launching new services.

For instance, BlackBerry secured design wins at Baidu and NVIDIA for its QNX automotive software platform. Additionally, commercial vehicle accessories supplier Pana-Pacific will sell BlackBerry Radar, a collection of fleet tracking solutions, at more than 2,800 commercial vehicle dealers across North America.

Additionally, Jaguar Land Rover has decided to tap BlackBerry's QNX software and security technology to power the infotainment system in its next-generation models. As the company's software and services business gains steam, that also bodes well for the company's margin profile.

Solid earnings growth is in the cards

BlackBerry's pivot toward software has given its margin profile a significant boost. The company reported a gross margin of 76% last quarter compared to just 60% in the year-ago period. In fact, BlackBerry's fiscal 2018 gross margin jumped a whopping 24.8 percentage points compared to the prior year. As a result, the company was able to post net income of $405 million in the recently concluded fiscal year versus a $1.2 billion loss in the previous one.

Looking ahead, BlackBerry's earnings power should continue to improve. Its software business isn't done growing yet, as evidenced by the spate of new deals recently announced by the company. In fact, BlackBerry expects its software and services billings to grow in the double digits once again this year.

New direction could lead to more gains

BlackBerry has been pulling the right levers to turn its business around. Looking ahead, the automotive software market is expected to grow at almost 50% a year through 2023 when it will be worth $586 million, according to Mordor Intelligence. BlackBerry is already making strides to grab market share in that space with major clients that include the likes of Audi, Jaguar, Range Rover, and Ford. It should come as no surprise if the company's transformation from mobile device manufacturer to software vendor pays off big time in the long run.