Apple defended how it gathers and uses customer-location data in a letter to a House lawmaker Friday as it prepares to testify at a Senate hearing today on mobile privacy, according to the “SF Gate” (http://macte.ch/Ueweh).

“Consumers are increasingly demanding accurate location information from their handheld devices,” including directions to the nearest coffee shop or gas station, Bruce Sewell, Apple’s general counsel, wrote in a letter to Rep. Mary Bono Mack, R-Palm Springs. The letter was released Monday by Bono’s office.

Apple and Google are scheduled to testify at a Senate Judiciary subcommittee hearing on mobile privacy today. The two companies have been at the center of a debate over whether the practice of collecting location data on mobile devices violates users’ privacy.