Sen. Al FrankenFollowing a recent uproar over the ways in which Apple and Google collect location information from mobile users, two U.S. senators have proposed a law that would require companies to get permission from mobile users before sharing that information with third parties.

Senator Al Franken, a Democrat from Minnesota, and Richard Blumenthal, a Democrat from Connecticut, submitted the Location Privacy Protection Act on Wednesday. They said the bill would close loopholes in federal law to ensure that people know what location information is being collected about them and let them decide if they want that information to be shared.

The bill would also require companies that obtain location information for more than 5,000 devices to take reasonable steps to protect that information, tell customers who ask whether they have their information and delete the information if a customer asks them to.

The renewed interest in privacy around mobile location data emerged recently after researchers showed that iPhones and iPads store unencrypted location data. Additional research found that both Apple and Google collect location information about users even when applications that require location information aren't running.

Google has said location sharing by users of Android phones requires users to opt in and that all location data the company stores is anonymized.

Apple said it downloads information about nearby Wi-Fi hotspots and cell tower locations to users' phones so that the phones can more quickly calculate their locations. During the hearings in May, Franken said Apple had offered conflicting information about what kind of data it stores and why.

Google declined to comment on the proposed legislation. Apple did not reply to a request for comment.

The CTIA, the trade group representing mobile operators, also declined comment. It offers operators a detailed set of best practices, including recommending that all companies that use location data ask customers before collecting the data and allow customers to opt out of that data collection.