It’s no secret that BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB) has struggled for some time and saw a year that investors and stakeholders alike can only hope ends without further misery. Today, BlackBerry announced that it had struck a five-year deal with Taiwanese manufacturing giant Foxconn Technology Co., Ltd. (TPE:2354) (OTCMKTS:FXCOF) that sent stocks soaring. The deal will ensure that BlackBerry handsets will be around for some time, and that BlackBerry has shifted its focus to emerging markets like Indonesia.

blackberry Ltd. BBRY BB

BlackBerry’s $4.4 billion write-down on unsold inventory in the third quarter signified the end for many, but the Toronto-based smartphone maker is taking Dylan Thomas’ advice and refusing to “go gently into that good night.” With today’s announcement, BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB)’s stock picked up 15% almost immediately. Noon today saw some of these gains evaporate before a return to $7.15, up $0.90 or 14.43% as of this writing.

The John Chen factor

BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB)’s CEO John Chen only took over a month ago, but it seems that he may just be the man to reestablish BlackBerry’s relevance.

“With the operational and organizational changes we have announced, BlackBerry has established a clear roadmap that will allow it to target a return to improved financial performance in the coming year,” said John Chen, BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB)’s interim CEO and executive chairman.

“While our Enterprise Services, Messaging and QNX Embedded businesses are already well-positioned to compete in their markets, the most immediate challenge for the company is how to transition the devices operations to a more profitable business model,” he added.

Read: we haven’t given up yet. The deal certainly suggests that BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB) may not win the judge’s decision, but BlackBerry has no intention of going the Roberto Duran route of “no mas.”

BlackBerry losing money on handsets is nothing new

“The big thing is they are committed to the handsets,” Kevin Michaluk, editor-in-chief of BlackBerry loyalist hub, told CNBC in an interview. “Blackberry always had trouble making money on handsets. It’s a part of the business they’ve never been great at but it’s an integral part of the business.”

The tie-up with Foxconn Technology Co., Ltd. (TPE:2354) (OTCMKTS:FXCOF) means “we will see BlackBerry hardware for years to come,” Michaluk added.

Whether the deal with Foxconn Technology Co., Ltd. (TPE:2354) (OTCMKTS:FXCOF) pans out, BlackBerry has the cash to give it a go. Not the kind of cash that will allow for continuing quarterly losses of a half billion dollars but cash nonetheless if they focus on emerging markets. While BlackBerry Ltd (NASDAQ:BBRY) (TSE:BB) will probably never compete with Apple Inc. (NASDAQ:AAPL) or Samsung Electronics Co., Ltd. (LON:BC94) (KRX:005930) in developed nations again, all is not necessarily lost.