Cannot receive push notifications from Quickblox - android

I'm trying to set up the messages module in the QuickBlox SDK. I'm able to register in GCM and send the push according to the logs. The problem is that I never get the push notification.
I tried with the default sample keys and with my own. I tried with server key and browser key and nothing.
Let me know what information you need so we can resolve this :(
In the QB console I get this:
Notification has been successfully added to queue
I tried from the development and production environments and nothing happens.

Related

Pushwoosh reports Unauthorized

I have an android app on google play store, when I try to send push notifications on it, all of sent pushes are reported as "Unauthorized", this is happening while I can send push notifications to my test devices successfully.
What could be the problem?
I'm using a GCM Api key (which I think it's functional as I can send test pushes successfully) and these are my project dependencies:
compile 'com.pushwoosh:pushwoosh:4.10.8'
compile "com.google.android.gms:play-services-gcm:10.2.4"
The user from the post in community.pushwoosh.com has the same issue with you. Here is the solution.
Please note that the "Unauthorized" error in the Control Panel means
that Pushwoosh cannot authorize at GCM while sending push
notifications. Most probably, something is wrong with the API key.
Please check GCM API key that you entered in your Android settings in
the Control Panel. You should try both Browser key and Server key.
For those who encounter this problem, i finally generated a new GCM Api key from google developers console and replaced it with the old one in pushwoosh pannel and it solved my problem and my push notifications were sent successfully from that point. As this question is asked a long time ago, currently if you encountered same problem, create new FCM Api key and replace it.

Send push notifications using Google console

I did create a GCM account for my app to receive push notifications, now there is a new update which is mandatory for the users to download otherwise they will loos a lot of app functionalities due to server side issues.
So, when trying to send the users a notification to inform them about how important this update is, I couldn't find any way to send notifications in Google console like in Firebase console if I'm using FCM:
and upon searching, I found some tools like pushWatch, but there is no tool that can handle this huge amount of device ids, also it whole fails if there is at least one single device is already updated and can't receive it.
p.s. the update contains a new server APIkey.
There is currently no option to send messages to all your users using the FCM REST API without specifying a target (registration tokens). The option to send a message to all users is only available through the Firebase Notifications Console.
So from the comments, if all you need is a way to send messages without an App Server, you could simply send a request using Postman or cURL.

ServiceNow Push notifications stuck in "Pending"

I have configured a Push Notifications at ServiceNow for a custom Android app. After triggering a specific event, the notification stuck in system log with "Pending" type.
Here are more details:
The user can login to custom APP on mobile device, and got registered in sys_push_notif_app_install table;
The event triggers a push notification and it is successfully written to System Log;
In system log I can see the message itself, where the registered device token is also mentioned.
Now the message remains “Pending” for specific period of time, after what turns to “failure”.
We have a Push Application configured in ServiceNow, that contains Goolge API key and “REST API” value for both Push and Feedback.
I can also see 2 error messages in System Log:
app="Push app name" origin="push.feedback"
Invalid Feedback REST Message: no thrown error
app="Push app name" origin="push.feedback" elapsed=8
exception encountered getting feedback:
java.lang.RuntimeException: feedback job does not have a valid
Feedback REST Message: com.glide.push.feedback.FeedbackClientRest.getFeedback(FeedbackClientRest.java:52)
Any ideas are highly appreciated.
I was finally able to solve it. The key point here, is to make sure the Push Application setup is correct. This is something not clearly stated in official docs. So for Android app, these points are important:
Push = Direct,
Feedback = REST,
Google API key = FCM Server Key (both leagacy and the new one are working fine).
Despite Google recommendations to set up HTTP headers for the REST message, the notifications are running fine both with- and without it. Therefore, normally you can leave out-of-the-box REST "Google Cloud Messaging Sent" unchanged.

not receiving firebase notification from console

i am not receiving notification after sending it through firebase console , i tried sending many notification but received one or two from around 20 notifications, i followed this guide firebase messaging from github
,why am i not receiving notification, my app is installed in one emulator and in one of my phone but when i receive notification which i have sent through notification panel i get them either on phone or emulator never got them on both.
below is the screenshot of my console
check your android app configuration in firebase console
use a restful client to make the request, i suggest
chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/dhc.html,
there you can see the response of the request, if your request are sent sucessfully or if you have error, and the response tells what kind of error you have
check android app , in the method onMessageReceived and print everything to see if you receive information, besides you can print the property "from" who is the id_number of your proyect, and you can see if the messages come from your firebase android app
check firebase documentation.
I've implemented everything just with the guides and its working pretty well
I solved the same problem.
The problem seems to be the browser compatibility/version. Mozilla Firefox could easily handle this.
Make sure your app is running in the background.
Open the Firebase notification console in the FireFox browser and send notifications.
Make sure token is generated
FirebaseInstanceId.getInstance().getToken();
in my case, the package name defined at firebase console isn't the same as defined on gradle and manifest of the app (i changed it one time in the app), so the app won't be able to receive notifications sent from firebase console.
They both have to be the same!
I did not add a new firebase project, just go to project settings at console and add new android app with another package name and have a look at the newly generated google-services.json and change some lines at you android studio project.
Besides the tips that Pavul Zavala said ، keep this in mind that just data message can received by FirebaseMessagingService even application closed or run in background and notification message can't handle(till this moment) when application run in background.
And all message that sent via FireBase console Contains , they always include a notification key
more detail at :
Push notification works incorrectly when app is on background or not running
In my case, what helped me is creating a new simulator in Android Studio
Few things to check:
in Firebase console https://console.firebase.google.com/ add/configure the project
in Android Studio connect to Firebase - Manu -> Tolls -> Firebase -> Cloud Messaging (Connect, Add FCM to your app)
Send notification from Firebase console
So, again, I recreated Virtual Device (open AVD manger and create the same device with the same API level)
I will be happy if somebody will save the time using this post :)
Ideally it shouldn't behave like that but it might be due to following reasons:
Check the notification priority of your app in the app settings of the device.
You might be sending the token of one particular device, Your target should be User segment.

Quickblox Android push notification

I am trying to implement push notification in my android application through quickblox API.
All the steps (registration, create push token , create subscription )are successfully executed but finally its throwing the following error message.
"No recipients. At least one user should be subscribed for GCM
(Android Push) (through SDK or REST API)"
I am not getting getting any clue on this error
I had same problem in iPhone. You are trying to send push notification to the user who has not subscribe yet or no one has subscribed for push notification.
What can you do : - run your application in actual device and run application in simulator with different login. And try to send push notification.
To which user you send Push Notification?
I thing you are trying to send push to user which is not subscribed for GCM (Android Push), and you got an error: "No recipients. At least one user should be subscribed for GCM (Android Push)"
You must register your device through the method GCMRegistrar.register() , please try to run on real phone rather than emulator. I also got the same error. But it was resolved
Updating my answer, I solved this issue,
After subscription of push just logout from Quickblox to receive push notification.

Categories

Resources