The surge in tablet usage, a trade-in promotion and a fee tacked onto bills helped boost AT&T's wireless revenue for the latest quarter, but profits declined as costs surged, the company said Tuesday.

AT&T's coffers were drained by smartphone sales, which it subsidizes in the hope of making money back over the life of two-year contracts. It set a second-quarter smartphone sales record, helped by a promotion that gave customers $100 off a new phone when trading in an old one.

Costs also rose due to investments AT&T is making to boost home broadband speeds.

AT&T Inc., the country's largest telecommunications company, said it earned $3.8 billion, or 71 cents per share, in the April-to-June period, compared with $3.9 billion, or 66 cents share, a year ago. The per-share figure rose despite the overall profit drop because AT&T has been buying back shares in addition to paying out its dividend.

Adjusted for a one-time gain of 4 cents for the sale of shares in Mexico's America Movil, the latest earnings were 67 cents per share, 1 cent below the analysts' forecast, according to FactSet.

AT&T's revenue was $32.1 billion, up 1.6 percent from a year ago and well above Wall Street's estimate of $31.8 billion.

AT&T shares fell 31 cents to $35.50 in extended trading, after the release of the results.

The Dallas-based company added 551,000 wireless devices to its contract-based plans, which are the most lucrative. That was the highest second-quarter figure in two years. However, all but 153,000 of the new devices were tablets, which carry lower monthly fees than phones.

AT&T ended the quarter with a direct billing relationship for 71.3 million devices on its network. It's the second-largest cellphone company in the U.S. after Verizon Wireless.

AT&T added a "Mobility Administrative Fee" of 61 cents to all its contract-based phone bills starting May 1. Effectively a price increase, the fee is similar to other fees phone companies tack on to their bills for "cost recovery."

The quarter marked the end of an era: AT&T stopped reporting the number of iPhones it activated in the quarter. It's a figure the company has trumpeted proudly to investors in previous quarters, because iPhone users spent more than average on wireless service. The company introduced the iPhone to the world and had the exclusive right to sell it in the U.S. for three years. As recently as the first quarter of this year, iPhones accounted for 80 percent of the smartphones activated on AT&T, despite a vow by its CEO to emphasize competing smartphones.

AT&T's head of investor relations, Susan Johnson, said the company stopped reporting its iPhone activations because it now has a broad portfolio of smartphones, including Android phones and Windows Phones.

The change comes as AT&T's long-time partner, Apple Inc., sees its overwhelming success wane. On Tuesday it reported the second straight quarter of declining profits, as competitors eat into its iPhone and iPad franchises.