Closed gtsak1 closed 1 year ago
Hi @gtsak1 ,
You must include the push-hms
peer dependency for supporting HMS devices.
implementation "re.notifica:notificare-push:$notificare_version"
implementation "re.notifica:notificare-push-gms:$notificare_version" // Enable support for Google Mobile Services.
implementation "re.notifica:notificare-push-hms:$notificare_version"
I've quickly tested it with our sample app and push messages are being received.
We intend to keep the GitHub issues as a channel for reporting bugs. For support-related matters, please create a ticket via our helpdesk or send an email to support@notifica.re. That way we can provide more contextualised support.
Thank you for your answer. I have already included both gms and hms notificare peer dependencies and followed the process for seting up firebase and hms in the project.
We cannot reproduce this with our HMS-only devices.
Can you share some evidence of the problem? Application logs from the configuration phase until after you've enabled remote notifications, a sample app where the problem occurs.
For the logs, enable debug logging by adding the following to your AndroidManifest.xml
application node:
<meta-data android:name="re.notifica.debug_logging_enabled" android:value="true" />
It seems there is certificate fingerprint error, although I have configured SHA-256 certificate fingerprint in developer Huawei appGallery Connect
E/Notificare: [ServiceManager] Failed to retrieve HMS token. com.huawei.hms.common.ApiException: 6003: certificate fingerprint error
There is also a warning:
W/Notificare: [NotificarePush] Push notifications permission is denied for this app.
Unlike Firebase, Huawei requires you to configure all fingerprints — not just the release fingerprint. I suggest checking your signing configurations (debug & release), configuring those in the Huawei portal and downloading their configuration file. From that error, we can be sure it's a configuration mismatch.
Regarding the warning, the SDK only prints the warning but does not restrict anything. We must, indeed, improve that warning since it's only checking for the FCM permission, which is not applicable in this case. I will create a task for correctly checking and issuing the appropriate warning, but you can discard this warning.
Problem solved by adding apps in the Huawei portal for every product flavor of the project and by adding debug and release SHA-256 certificate fingerprints for each app in the Huawei portal.
Notification is sent and received successfully by non-huawei devices as well as by huawei devices using both gms+hms. Problem is that newest huawei devices running only hms seem to not allow app to send remote notification (see attached screenshots). Also, hms only devices have transport protocol set to "Notificare", not "HMS". I am not sure if that is the problem. Notificare version used is 3.3.1