What's the difference between android.permission.ACTIVITY_RECOGNITION and the Google one?

Viewed 53

I wanted to add ACTIVITY_RECOGNITION permission in AndroidManifest.xml file. I'm not sure which one I should use.

<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>

or

<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

Is there any difference between the two?

1 Answers

From my understanding, we had to use the GMS one before Android 9 as it wasn't part of Android but only an addon of the Google Play Services. Since Android 9, the feature has been added so Android now has a framework permission for it.

Related