4

In our app we have dependency: com.huawei.hms:base:6.1.0.302 and use HuaweiApiAvailability class.

As result of calling this function PendingIntent getErrPendingIntent(Context var1, ConnectionResult var2) we have exception:

Process: com...preview, PID: 10355
java.lang.IllegalArgumentException: com...preview: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at com.huawei.hms.api.b.getErrPendingIntent(HuaweiApiAvailabilityImpl.java:10)
at com.huawei.hms.common.internal.BaseHmsClient.resolution(BaseHmsClient.java:3)
at com.huawei.hms.common.internal.BaseHmsClient.checkAvailabilityAndConnect(BaseHmsClient.java:34)
at com.huawei.hms.common.internal.BaseHmsClient.connect(BaseHmsClient.java:1)
at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.connect(HuaweiApiManager.java:21)
at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.sendRequest(HuaweiApiManager.java:24)
at com.huawei.hms.common.internal.HuaweiApiManager.connectAndSendRequest(HuaweiApiManager.java:8)
at com.huawei.hms.common.internal.HuaweiApiManager.handleMessage(HuaweiApiManager.java:7)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)

Question: are you planning to update PendingIntens with new flag for Android 12?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • hi@Gleb Maliborsky, Thanks for your feedback, we have reported this issue to the R&D team. And btw, may i ask in which specific scenarios you use this API? – zhangxaochen Sep 18 '21 at 07:18

1 Answers1

2

Update

A new version of the base SDK has been released :

implementation 'com.huawei.hms:base:6.2.0.300'

This issue has been fixed, you can explicitly depend on this version of base sdk first, which should fix the problem.


Thank you for your feedback, the R&D team confirms that a fixed version will be released at the end of September. Please use the latest version for testing by that time. Thanks.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • Hi @shirley, thanks for response! Do you have exact date when it will be released? Today is latest date of September, but no new version of library. – Gleb Maliborsky Sep 30 '21 at 15:04
  • hi@Gleb Maliborsky, Thank you for your feedback. The team confirms that the development is underway and the new version will be released in the next few days, and will let you know when it's released. – zhangxaochen Oct 08 '21 at 02:08