Location: GPS/network permissions: wanted if available

Viewed 7027

I want my application to access GPS/Network locations if they are availabe. I don't want Google Play to filter out devices without GPS/Network locator.

How should I do this?

Currently I have this on my manifest:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />

However, I am not sure it that is enough, because http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions-features states that:

-permission ACCESS_COARSE_LOCATION implies android.hardware.location.network and android.hardware.location features requirement

-permission *ACCESS_FINE_LOCATION implies android.hardware.location.gps and android.hardware.location

Do I also have to add <uses-feature android:name="android.hardware.location.network" android:required="false" /> and <uses-feature android:name="android.hardware.location.gps" android:required="false" /> ?

Why?

Shouldn't <uses-feature android:name="android.hardware.location" android:required="false" /> be enough?

1 Answers
Related