In the midst of an uproar over ways that Apple and Google collect and store location information from mobile phones, Microsoft has laid out details about its Windows Phone 7 data collection policies.

In the midst of an uproar over ways that Apple and Google collect and store location information from mobile phones, Microsoft has laid out details about its Windows Phone 7 data collection policies.

Microsoft says that it collects location information only if users allow an application to access location data and when that particular application requests location information. It also said that it keeps that data in a Microsoft database.

Apple has come under fire in recent weeks after researchers showed that the iPhone and iPad store location data about users on the devices. 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 defended itself by saying that location sharing by users of Android-based mobile phones is opt-in and that all location data the company stores is anonymized. Apple has not commented on the situation.

Microsoft said that it assembles and maintains a database of the locations of cell towers and Wi-Fi access points in order to provide its location services. When a user accesses an application that requires location information, Microsoft compares the Wi-Fi access points and cell towers in range of the device with the location database, which contains details of the locations of the access points and cell towers.

Microsoft has assembled the database in two ways, it said. One is via teams of people who drive around with phones that collect information about Wi-Fi access points, matching that data with location information collected via GPS. The company started that process last year and plans to continue this year, it said.

In addition, when customers are using location-aware applications and Wi-Fi is turned on, the phones collect information about nearby Wi-Fi access points. If the user has GPS turned on, Microsoft will also collect location details.

Microsoft said it only collects location information when a particular application requests it. Also, it said that when it collects location information, it matches it with a randomly generated ID assigned to the device, which is retained for a limited period. It uses that ID to distinguish location requests.

The company left a few unanswered questions, including how long it retains data collected from user phones. It said it stores the data in a Microsoft database, but did not specify whether it also stores any such data on user devices.

Because Microsoft has a relatively small mobile market share, it may escape some of the questions aimed at its competitors. Over the past weeks, the Illinois attorney general, Minnesota Senator Al Franken and Congressman Edward Markey have all asked Apple and Google to respond to questions about their location collection activities. Two consumers have filed a lawsuit in Florida charging both companies with fraud. In addition, governments in Korea and Europe are reportedly investigating the matter.