hms-flutter-plugin icon indicating copy to clipboard operation
hms-flutter-plugin copied to clipboard

[huawei_health: ^6.3.0+302] Android 12

Open secretmoo35 opened this issue 2 years ago • 3 comments

Description I'm have project use flutter version 3 and huawei_health: ^6.3.0+302 and set target android version to 32 but there is a build problem.

Expected behavior Can be used with android target version 32 / android version 12

Logs android:exported needs to be explicitly specified for element <service#com.huawei.hms.flutter.health.modules.autorecorder.service.AutoRecorderBackgroundService>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

Environment

  • Platform: Flutter
  • Kit: Health
  • Kit: 6.4.0.300
  • OS Version: Android 12

secretmoo35 avatar Aug 12 '22 11:08 secretmoo35

Experience the same issue.

asadamatic avatar Aug 13 '22 06:08 asadamatic

I have created a pull request with the solution. Until the developer merges the pull request, you can use from my forked repository like this,

huawei_health:
    git:
      url: https://github.com/asadamatic/hms-flutter-plugin
      path: flutter-hms-health
      

asadamatic avatar Aug 13 '22 07:08 asadamatic

huawei_health:
    git:
      url: https://github.com/asadamatic/hms-flutter-plugin
      path: flutter-hms-health
      

Thanks for help. it worked for me.

secretmoo35 avatar Aug 15 '22 02:08 secretmoo35