QuickBlox / quickblox-android-sdk

QuickBlox Android SDK includes code snippets with main use cases and framework JAR library.
BSD 3-Clause "New" or "Revised" License
417 stars 697 forks source link

Not getting push notification on android device #726

Closed premchand-algo closed 2 years ago

premchand-algo commented 4 years ago

Hi,

I am not getting any push notification on android. I have followed the all steps as given https://docs.quickblox.com/docs/android-push-notifications.

   String outMessage = String.format(String.valueOf(R.string.text_push_notification_message), senderName);

    QBEvent qbEvent = new QBEvent();
    qbEvent.setNotificationType(QBNotificationType.PUSH);
    qbEvent.setEnvironment(QBEnvironment.DEVELOPMENT);

    JSONObject json = new JSONObject();
    try {
        json.put("message", outMessage);
        json.put("ios_voip", "1");
        json.put("VOIPCall", "1");
    } catch (JSONException e) {
        e.printStackTrace();
    }
    qbEvent.setMessage(json.toString());

    StringifyArrayList<Integer> userIds = new StringifyArrayList<>(recipients);
    qbEvent.setUserIds(userIds);

    QBPushNotifications.createEvent(qbEvent).performAsync(null);

Thank you Prem

TheVigor commented 3 years ago

Yes, not able to receive push notification on Android after all steps in tutorial. Please, help.

shaheer47 commented 3 years ago

Only getting notification when it is send by admin portal. But when it comes to chat no notification.

alexparvus1 commented 3 years ago

Please provide additional information.

  1. Do you already have Firebase account and did you set in properly with your sample application and package ID in Firebase Console?
  2. Did you already set the Server Key from your Firebase Console -> Your Project Settings -> Cloud Messaging to your QuickBlox Admin Panel -> Push Notifications -> Settings -> Firebase Cloud Messaging -> (the same server key for Development and Production Environment)?
  3. Did you already set Sender ID value from your Firebase Console -> Your Project Settings -> Cloud Messaging to your project - res/values/strings/ into the ?
umangnine commented 3 years ago

Hello @alexparvus1, I am having the same issue with the Android Push notification! I have followed all steps and configured everything correctly from my side. Even I test FCM Token and Server Key twice by sending notifications from other sources. So, everything is setup correctly but still no success with the QuickBlox Push notification on android devices.

Kindly help!

All Contributors, I request you to look into this issue! I am sure that, there is nothing wrong from configuration side but there is some issue with your server (might be with the shared hosting server).

Please resolve this issue ASAP! It's really crucial feature and we can not utilize QuickBlox with such issues!

Requesting you again to check it quickly and update us ASAP on this!

Thanks!

Jcabanillas98 commented 3 years ago

Bueno yo logré hacer que lleguen las notificaciones por medio del chat, tan solo hice lo siguiente

private void prepareUser(String qbLogin, String name, String lastName) { QBUser qbUser = new QBUser(); qbUser.setFullName(String.format("%s %s", name, lastName)); qbUser.setLogin(qbLogin); qbUser.setEmail(qbLogin); qbUser.setPassword(USER_DEFAULT_PASSWORD); signIn(qbUser);

    QBSettings.getInstance().setEnablePushNotification(true);
}
alexparvus1 commented 3 years ago

Hello, @umangnine we always watching on Pushes and other functionality. When something falls from our side - we fix the problem immediately. What is your issue? What went wrong? Please provide information in your ticket contact QuickBlox support team https://assist.quickblox.com/

ghost commented 2 years ago

Hello,

This is Nikolay from QuickBlox support.

Please follow our guide to the configuring push notifications: https://help.quickblox.com/article/268-configuration-of-chat-and-video-push-notifications

Please let me know if the issue is still relevant.

ghost commented 2 years ago

The issue is being closed as outdated.

If it is still relevant, feel free to open a new issue.