hms-flutter-plugin
hms-flutter-plugin copied to clipboard
[huawei_map] Google Play rejects apps that uses this package
Hello,
We've recently got an email from Google Play saying that our app contains Huawei SDK in which they don't allow apps from Google Play to download content from outside their store.
Version used (pubspec.yaml)
huawei_map: ^6.5.0+301
Multi Product Flavor in Android
In our android app build.gradle
file, we've these flavors
android {
// ...
signingConfigs {
googlePlay {
// Key assignments here
}
huaweiAppGallery {
// Key assignments here
}
}
flavorDimensions 'store'
productFlavors {
googlePlay {
dimension 'store'
signingConfig signingConfigs.googlePlay
}
huaweiAppGallery {
dimension 'store'
signingConfig signingConfigs.huaweiAppGallery
}
}
// ...
}
We've tried to exclude the :huawei_map
project by doing this:
dependencies {
// * Excluding 'huawei_map', if the build is 'googlePlay'
implementation (project(':huawei_map')) {
configurations {
googlePlayCompile.exclude group: 'com.huawei.hms.flutter.map'
}
}
// * Including 'huawei_map', if the build is 'huaweiAppGallery'
huaweiAppGalleryImplementation project(':huawei_map')
huaweiAppGalleryImplementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
huaweiAppGalleryImplementation 'com.huawei.hms:push:6.3.0.304'
}
But, didn't work well since the generated file GeneratedPluginRegistrant
is using it as a dependency as it's been added in pubspec.yaml
file
Help needed
Any solution that we can use in order to add the Huawei map functionality back to our app properly without getting our app rejected by GooglePlay?
Thank You
I don't have a proper solution, but I had the same issue with my app Aves.
As a workaround, I organized map related features in packages that could be switched in pubspec.yaml by script. There's a package for each flavor (google / huawei) + one used as an interface. In the app repo, you can check out how everything fits in practice with the packages, scripts and github actions.
@deckerst although the workaround is very brilliant, but this would make things a little bit complicated!
What i did as a workaround, is that the Huawei devices can run google maps through web, and there's an awesome package which does this job called "map" and by doing so, we don't need the huawei_map package anymore.
It's not a perfect solution for now but at least i managed to get this done on Huawei devices without any issues.
Hello, from what I understand your application uses the HMS? In this URL https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-sdk-integrating-sdk-0000001061671869#section926020288361 it says that putting implementation 'com.huawei.hms:maps- basic:{version}'
will no longer use HMS. Do you think that fixes the complaint says Google?
The link I gave you is with an Android project, I think we can add implementation 'com.huawei.hms:maps-basic:{version}'
in a flutter project.
Hi @ozkulbeng, anything new about this issue? has this issue been resolved in the latest version?