Barnes & Noble (BKS) announced a partnership with Samsung Electronics to make Nook tablets, as the bookseller moves forward with plans to revamp its digital business.

The companies said Thursday they will develop co-branded Samsung Galaxy Tab 4 Nook tablets, starting with a seven-inch version due out in early August. Barnes & Noble will sell the devices online and in stores alongside its lineup of Nook e-readers.

Barnes & Noble has struggled to sell tablets in the face of competition from tech giants like Amazon.com (AMZN) and Apple (AAPL). In recent quarters, the company has reported weaker sales of digital books.

New York-based Barnes & Noble once considered spinning off its Nook unit. Instead, it chose to end in-house production of tablets and seek out a hardware partner.

Chief executive Michael Huseby said the partnership with Samsung will allow Barnes & Noble to reduce its exposure to the substantial costs of making tablets. Going forward, Barnes & Noble will focus on growing Nook content sales.

“Partnering with Samsung brings our customers great new products and evidences our commitment to our NOOK customers and growing our digital content business,” Huseby said in a statement.

Huseby added that Barnes & Noble will provide sales support and customer service for the new Nook tablets from Samsung.

In a separate announcement, Barnes & Noble detailed plans to move its Nook Media division from its Palo Alto, Calif. campus to smaller facilities in Santa Clara and Mountain View, Calif.

The move will save Barnes & Noble about $10 million in annual occupancy expenses, reducing the company’s future lease commitments by approximately $102 million. The company expects to record a charge of approximately $30 million in the fourth quarter.

Shares rallied 3.2% to $19.51 in recent trading. Barnes & Noble has jumped more than 30% year-to-date.

Follow Matthew Rocco on Twitter @MatthewRocco