-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Client is not registered with Notification hub #5046
Comments
Hmm, seems to be a problem of my emulator because on Hardware it works :-) But nothing is displayed. Application output says: Downloaded demo app also has warnings on new Notification.Builder because SetSound is deprecated and Resource.Drawable.ic_stat_ic_notification is not found. Any updates available? |
Thanx for the feedback! |
@K232 can you provide the link you used to download the demo app? Thanks! |
Thanks @K232, note that your emulator must be configured with Google Play Services (ie "a virtual device that has Google APIs set as the target"). The Play app should be present on the emulator - we'll make this more obvious in the doc. We've identified this as a common cause of push notifications not working on emulators, since Google Play Services/Google APIs aren't automatically present in every emulator configuration (especially when it works fine on real hardware). You can read more about emulator configuration on the Xamarin site: |
@K232 Before an Android app can receive push notifications, it must register with Firebase Cloud Messaging, which generates a registration token and returns it to the app. This is accomplished by:
When the app receives a registration token from Firebase, the The fact that For more information about how to do this, see Sending Push Notifications from Azure Mobile Apps. |
@K232 Also, I've fixed the deprecated SetSound API. However, I've no problems with Resource.Drawable.ic_stat_ic_notification. If it wasn't in the project, the app wouldn't build. |
The doc and sample have been updated with the feedback from this conversation #please-close |
I'm trying to add Push Notifications to my Xamarin Forms app. Azure Notification Hub works fine, I see my server sent several messages. But they do not appear on my Android. I've implemented AzureNotificationHubService https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push#registering-with-the-azure-notification-hub, nor AndroidManifest or FirebaseRegistrationService.
But I wonder because RegisterAsync in AzureNotificationHubService is never called. Is that correct or am I missing something?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: