Xamarin Android GCM Client does not work - android

I have set up the GCM Client according to the example in the Xamarin component store. Furthermore I have followed the tutorial on Notification Hub.
I run my test on the Android 4.4.2 Emulator with Google API 19 and on various android devices (4.4, 5.1). I am working with the latest version of Xamarin.
In the emulator the PushHandlerService.OnRegistered is called and I can register the device token in the notification hub. However, the PushHandlerService.OnMessage method is not called when I send a message.
On real devices, not even the PushHandlerService.OnRegistered is called.
I have tried to send the message via notification hub and directly via the GCM service (HTTP Post). Both calls to the services succeed, but the message does not arrive in my app. I have tried notification messages with notification and/or data payload while the app is active or closed. I added my google account to the emulator. I have ensured that my google project number and package name are correct (google developer console corresponds to app).
How can I investigate my issue further?
Is there a possibility to see the delivery log in GCM?
Is there a way to see if the notification message at least arrives in my emulator's operating system?
What can go wrong so that my emulator receives a registration ID, but not the real device?

I finally ended up with the new GCM API according to the Xamarin tutorial: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/android/
Furthermore I unblocked the GCM ports on our firewall: : 5228, 5229, 5230

Related

OneSignal says message is delivered but no push notifications are delivered to the device

We have an app built in React which uses OneSignal via a PHP API to send push notification. Everything looks to be working according to the OneSignal dashboard however no notifications are being received on the device. However we can manually send a test from OneSignal and it comes through to the device.
We have been through the troubleshooting and FAQs on OneSignal but nothing seems to help.
OneSignalMessage::create()
->subject($subject)
->body($this->message->content)
->setData('to', $this->message->chat->makeUrl($notifiable->club))
->setParameter('ios_badgeType', 'Increase')
->setParameter('ios_badgeCount', 1);
One nuance: "Delivered" refers to the notification request being delivered to Apple and Google. It does not confirm that the device itself received it. Please contact our support channel at OneSignal.com for further support.

pushnotification not received in android w.r.t. cordova app

I am working on pushnotifications w.r.t. bluemix services recently, for cordova android application.
Toolkits used: Android 24 version, Java 8.
Steps followed: once user registered with bluemix services for push notifications w.r.t. GCM (google cloud messaging), then send push notification from the bluemix console service. Unfortunately I didn't get any of the notifications to the android device.
NOTE: I have followed steps provided from the below url:
https://github.com/ibm-bluemix-mobile-services/bms-samples-cordova-hellopush
So I've just attempted to recreate your issue and ran through the sample with the latest version of Cordova (6.3.1). I'm also running the newest version of Android Studio:
There was some lag when initially sending my Push notifications (it probably took ~5-10 minutes after initial registration for me before they all started to come through).
Before sending:
After sent:
From your issues, on the top of my head, I think of a few things that could have potentially gone wrong:
There was some network latency after registration, and the Push Notifications would have eventually come through.
Your GCM / Push Notifications service was configured incorrectly. To test this, I would try out the Android hellopush sample to see if I can get anything.
Different versions of Cordova or the emulator could be the culprit.
It could be something else entirely :0)
If you keep running into issues or #4 is the case, I recommend opening up a support ticket with your Push Notifications service instance. This should provide a little more of your app information to the Bluemix Mobile service team, and they should be able to look at the server logs to see what is happening to your notifications.

Azure notification hub sending notifications to iOS only

I'm working on a multi-platform app which includes push notifications. The issue I'm facing is described in the images below
1st Scenario :
2nd Scenario :
However, when I test notification hub (using azure portal or Visual Studio), I receive notifications on all the devices.
It seems that Azure Notification Hub is ignoring Android devices when an iOS device uses the same account (tag).
Any help would be appreciated
For that type of issues, use the Service Bus Explorer. Likely, your Android app did not subscribe successfully for some reason. Subscribing different apps working on the different platforms to the same tag should not be a problem - i saw it working many times, and implemented that by myself.
If you see in the Service Bus Explorer (see registrations for your NH, and search for your android app registration and the tags field) that your android app is subscribed to the tag, but you see no notifications, check if your notification is malformed.

Worklight: Push notification will not work, because register/unregister to GCM service returned error AUTHENTICATION_FAILED

I have a Worklight app that uses push notifications. I use three Android devices (and two iOS ones) to test the notifications functionality:
A Galaxy S2 with Android 4.1.2.
A Galaxy XCover with Android 4.1.2.
A Galaxy Tab with Android 4.2.2.
Yesterday, all of a sudden, the XCover started to give the Push notification will not work, because register/unregister to GCM service returned error AUTHENTICATION_FAILED error when trying to subscribe to notifications. The other two devices subscribe correctly. To be sure that it's the same version, I removed the app and installed it on all the three devices anew, to no avail.
26-10-2014 15:19:12:782 DEBUG Clearing notification subscriptions.
26-10-2014 15:19:12:791 DEBUG Clearing tag notification subscriptions.
26-10-2014 15:19:12:796 DEBUG Send new server notification token id.
26-10-2014 15:19:12:798 DEBUG Updating tag notification subscriptions.
26-10-2014 15:19:12:805 DEBUG response [https://XXXXXXX] success: /*-secure-*/
26-10-2014 15:19:12:953 WARN Push notification will not work, because register/unregister to GCM service returned error AUTHENTICATION_FAILED.
26-10-2014 15:19:12:979 DEBUG Служба Push: неправильный пароль.. Notifying javascript about unsuccessful registration to the GCM service.
26-10-2014 15:19:13:80 ERROR Cannot register for Google Cloud Messaging. Служба Push: неправильный пароль.
26-10-2014 15:19:14:959 DEBUG Piggybacking event transmission
The couple of words in Russian read "Push service: wrong password". How is it possible that the same app works differently on three devices (whereas it used to work correctly on all the three)?
Worklight version 6.2.0.00-20140922-2259.
My only thinking, because evidently the GCM account details are valid (working on 2 other devices), is that something went wrong in the device settings.
My suggestion is for you to reset the device to its factory setting, enable WiFI connection and try again to install the application and subscribe to notifications.

No GCM notifications received in emulator

I am developing an Android application that uses Google Cloud Messaging (GCM).
I follow these steps mentioned here:
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
When running many emulators, Database can get registration ID for each emulator. But unfortunately, I cannot receive any notifications sent by my app server (local host).
Do you have any idea what would make this problem ?
That will be appreciated.

Categories

Resources