Apple and Google defended their privacy practices in front of a congressional committee.
Last month privacy concerns were raised after it was discovered that Apple and Google’s Android-based phones collected user location data without prior consent.
At a hearing of the newly formed Senate Judiciary Subcommittee on Privacy, Technology and the Law, Senator Al Franken said, "I believe that consumers have a fundamental right to know what data is being collected about them."
Senator Patrick Leahy said he was "deeply concerned" about reports.
Apple repeated its earlier explanation saying that the data was collected anonymously.
"These services offer many benefits to our customers by enhancing convenience and safety for shopping, travel and other activities," the Apple executive said.
He said location data is "collected anonymously in a form that does not personally identify you" and Apple "does not share personally identifiable information with third parties for their marketing purposes without consent."
Google said that location sharing was an opt-in option for users.
Google’s Alan Davidson said his company is "committed to the highest standards of privacy protection in location-based services."
"While location-based services are already showing great value to users, Google recognises the particular privacy concerns that come with the collection and storage of location information.
"Location-sharing on Android devices is strictly opt-in for our users, with clear notice and control," he said.