Quickblox 422 No recipient issue using Android SDK - android

I am using Quickblox Android Chat SDK for my chat module. I have implemented whatever the process stated in Quickblox Site. I was able to register,login and creating session to the Quickblox programmatically and able to chat and chat history successfully. I got struck for some users, I am not able to chat as I am getting 422 error "'{"errors":{"base":["No recipients. At least one user should be subscribed for GCM (Android Push) (through SDK or REST API)"]}}'". But for some users, I am not facing any problem. Please suggest me the solution for this problem.

In means that a user doesn't have a push subscription, so he can't receive pushes
follow this guide to subscribe a user to receive push notifications http://quickblox.com/developers/SimpleSample-messages_users-android#Giving_a_user_a_Push_Notification_subscription

Related

Quickblox 1:2 or multi user chat same time

Hi All I am developing an chat app using Quickblox api for android. And 1:1 chat is working fine but my issue is how can i get a notification that some other user also message me during the chat like in other chat app. I check there api but not find anything regarding background notification. There is example for push notification but push is not fit with chat. So can anyone know how to handle this issue or any example to handle it using quickblox. Thanks in advance
If your are offline then QuickBlox will deliver to you offline push notification when someone sends a message
http://quickblox.com/developers/Android_XMPP_Chat_Sample#Push_notifications_to_the_offline_users
You have to enable it in Dashboard

Client triggered Parse.com Push notification

I am creating a simple forum app for ANDROID using Parse. I am stuck at a problem related to notifications
For instance I want that when user A posts a comment in a forum app, user B (who subscribed to that post) will receive a push notification, can I do that using either client code, instead of handling it using Cloud Code, or the REST API? If not then how to I start developing the server side to use cloud code or REST API
Allowing users to send push notifications via the client is bad for security reasons. It's not incredibly difficult to get the application id and client key to an app. Anyone with that information will be able to create their own code that allows them to target whoever they want with push notifications if client push is enabled.

Sending android app notification to facebook using facebook API Notification

Hi I want to send notifications from android app to facebook. To send facebook notification i got this link : https://developers.facebook.com/docs/concepts/notifications/ But i am not sure how to use this link in android to send notification.
Please can any body guide me for this?
You can't send notifications from an Android app. Tried to POST using the link you provided and got the following error:
{"error":{"message":"(#200) Only web canvas apps can send app notifications","type":"OAuthException","code":200}}
Maybe you could use this one:
https://developers.facebook.com/docs/android/send-requests/
We're not allowed to send notifications from Android app using the notifications API, nor sending App Requests from non game app using Requests APIs. I'm interested too to know how can we notify the user from non-game-android app.

Implementing one to one and group chat in android [duplicate]

This question already has answers here:
How to make a chat application in android? [closed]
(6 answers)
Closed 9 years ago.
I am developing an Android app in which I have to implement chat messaging. I would like one to one chat or a group chat.
But I have no idea how to start. Please help me with this stuff. Any help will be appreciated.
A simple chat mechanism will have 2 basic functionalities
Send the message to server (with info about the recipient)
Receive the message from server (designated for my user name)
First step is simple, we can create a web service which will accept the message with additional information about recipient(s). We can create it using any server side language.
Step 2, that is fetching the message from server can be done using 2 techniques, Pull the message (using polling) from server, or Push the message from server to android phone
Polling: In this, the android device will keep accessing server after a few seconds to check if there is a message available for user. This again can be implemented using a simple async task at the client side which will keep calling a web service after say 2-3 seconds. This is fine to use if we are planning to enable chatting only when user is accessing the app (no notifications like gmail or facebook), so that we can kill the polling service when not in use (otherwise it will eat up resources).
Push notifications: a better option is to use push notifications. Android provide Google cloud messaging or GCM (http://developer.android.com/google/gcm/index.html) which will help achieve push from server easily. Otherwise you can try a third party API like urbanairship or pushwoosh depending on your requirement. Push notifications will help the user to receive messages even when he is not using the app.
So in nutshell, a webservice to receive the messages and a push notification mechanism should be sufficient to implement a chat service in android.
Little bit about UrbanAirship
I used UA in one of my projects for push notifications as I needed to support both iOS and Android. If you just want to support Android GCM might also be a good option.
Coming back to UA, check this for sample code and usage: https://docs.urbanairship.com/display/DOCS/Home
The way it works is simple, when someone installs the app and is connected to internet, app registers itself to the UA service. A unique code is specified for each installed app (this is the time when you can capture the user name and unique code and store somewhere in your DB). Next UA provides an API using which you can push a message to designated recipient(s), using the unique codes which are available with UA. These messages can be received by android app and used as per the requirement. Even if the app is not running we can show a notification just like when we receive an email or a message
You can use an existing platform like Scringo. It gives you a one-on-one chat as well as group chat (both the client and the server) as well as the push notification service.

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