Flutter app which uses huawei_push rejected by Google Play Store

364

Update

The problem has been reported to R&D Team. And it's expected to be fixed in the next version.

At the same time, we provide a workaround solution. You may refer to this before next version release.(The Flutter plug-in is open source, so you can modify it directly)

Here's how to modify:

1.Open the pubspec.xml file in the root directory and find the plug-in.Like following:

dependencies:
  flutter:
    sdk: flutter

  huawei_location: 5.0.0+301

You need to find the cache directory of the Flutter, for example:

enter image description here

Find the plug-in directory, for example:

enter image description here

If the plug-in points to a directory, for example:

dependencies:    
    huawei_location:
        path: {library path}

directly access the directory.

2.Modify the build.gradle file in the android directory to modify the SDK version on which the file depends.

For example: implementation 'com.huawei.hms:location:5.1.0.303'

P.S. The PendingIntent issue has been resolved in Push kit 5.3.0.304. So you can directly use this version.

After the modification, run the following command to trigger compilation: flutter run

Share:
364
Krzysztof Mamak
Author by

Krzysztof Mamak

Updated on November 23, 2022

Comments

  • Krzysztof Mamak
    Krzysztof Mamak over 1 year

    I want to use huawei_push kit in my flutter app but Google Play Store rejected my app because of PendingIntent issues (security rules). I want to use the same source code for Google Play Store and Huawei App Gallery. I was thinking of:

    1. building APK based on flavor (huawei push kit dependencies won't be used in built APK),
    2. using different pubspec.yaml files to avoid huawei push kit dependencies in the whole project.

    Question:

    How can I use huawei_push kit just for Huawei App Gallery still using the same source code for different stores?

    • shirley
      shirley over 2 years
      hi,i just updated my answer below,pls kindly refer that. And feel free to contact me if you need any further help. :)
    • Krzysztof Mamak
      Krzysztof Mamak over 2 years
      After removing all dependencies related to huawei_push on pipeline, I released new version of the app. The newest version of the app was released a week ago and I haven't gotten any warning since then. In addition - on the 1st of October, huawei_push package has been updated. There is a note in the changelog that issue of Implicit PendingIntent was resolved.
  • Krzysztof Mamak
    Krzysztof Mamak over 2 years
    It is strange but the app with huawei push kit meets all review requirements, but is rejected after publishing in the Google Play Store. I decided to modify dependencies on pipeline (I followed this solution) - if it doesn't help, I will follow your solution. Anyway thank you and I will post the feedback soon.
  • Krzysztof Mamak
    Krzysztof Mamak over 2 years
    Hi, I've added a comment on the main thread.