0

I'm trying to integrate huawei push kit to my application for notification, the problem is that it works on debug build variant but don't in release. When it tries to retrieve token, i get error code: -5. Did someone was able to test notification with push kit in release mode WITHOUT publish it on the AppGallery?

I used this guide to integrate push kit: https://developer.huawei.com/consumer/en/codelab/HMSPushKit/index.html#0

and this is code i use for my app (Flutter but I think it will be the same problem in Native Android too): https://pub.dev/packages/huawei_push/example

I testen on debug mode and it works fine, I'm able to get Token and use that to send notification but when I try in release mode I'm not able to retrieve token.

1 Answers1

0

For -5 error code, you need to check your app's obfuscation configuration script. You can find the error codes and their solutions on Huawei Developers website. For reference: documentation

For obfuscation scripts, you can follow this documentation, as well.

kristin.bo
  • 11
  • 1