I'm trying to implement the new Android Photo Picker but I'm running into an issue when trying to setup the automatic install of the backported photo picker module on older devices.
According to the docs we need to add the following to our app's manifest file to allow this:
<!-- Trigger Google Play services to install the backported photo picker module -->
<service android:name="com.google.android.gms.metadata.ModuleDependencies"
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.metadata.MODULE_DEPENDENCIES" />
</intent-filter>
<meta-data android:name="photopicker_activity:0:required" android:value="" />
</service>
However, when I do that, I get an error in Android Studio about "com.google.android.gms.metadata.ModuleDependencies" not being recognized or resolved.
How can we fix this?
com.google.android.gms:play-services-home
, version16.0.0-beta1
or higher. Google's docs for Matter integration show the same sort ofcom.google.android.gms.metadata.MODULE_DEPENDENCIES
<service>
element. If that works, you might then be able to identify the specific dependency that contains the class. – Mali