q-municate-android icon indicating copy to clipboard operation
q-municate-android copied to clipboard

Background Incoming call and message notification is not receiving in Android Q-Municate

Open roma50 opened this issue 7 years ago • 23 comments

I modified Q-municate powered by QuickBlox (which is open source) GitHub code. But, in this app Voip is not working. when i open the application then only can call receive and message notification. So how to show incoming call screen when app will be close and phone screen will lock. Please tell me the solution of this issue. Thanks

roma50 avatar Oct 28 '17 05:10 roma50

@roma50 Have a look at video-sample. There is implementation of opening IncomingCallFragment by receiving push in this sample.

RomanPronin avatar Oct 30 '17 10:10 RomanPronin

I am modifying qmunicate app provided by quickblox and according to quickblox documentation they have added firebase notification service for notifications and they have asked to add Google API key in quickblox admin panel and Google project key in project and I have done both things and after that I have checked new users are getting subscribed to firebase notifications but still I am not receiving notifications.

roma50 avatar Oct 30 '17 14:10 roma50

Did you add your google-services.json to app module?

RomanPronin avatar Oct 30 '17 14:10 RomanPronin

Yes. I added but still not getting notification.

roma50 avatar Oct 30 '17 15:10 roma50

What's the issue why the notification are not getting. How to solve this isue. Please me for solving this issue

roma50 avatar Oct 30 '17 15:10 roma50

If you have successful subscription, but do not receive pushes, you always can check the next:

  1. Check certificates for pushes: Admin panel ->Push Notification ->Settings -> APNS, GCM etc.
  2. Send push from Admin Panel - > Push notifications - > Send (link )
  3. Also you can check Push Notifications Queue tab in Admin panel, there should be a log of your push. It will help you to understand what's going on with your devices.

RomanPronin avatar Oct 30 '17 15:10 RomanPronin

Mr. RomanPronin, I am not getting any notifications in Queue. Is it right it will not work in free account. ? Is it right it will work only in Premium Account of QuickBlox.? Please help me to sort out this issue. Kindly confirm me is there issue of free and premium account? or is there any other issue? Please help me in this issue i done all step what you told above but still not getting any notifications in Queue. I am using free account at this moment.

roma50 avatar Oct 30 '17 16:10 roma50

Notifications work in all accounts. So, check the next: Send Push notifications from admin panel. If you do not see any error alerts, after that in Push Notifications Queue tab in Admin panel will appear new message with status. If there are no messages in Queue, most likely you don't have any subscribed user for pushes. To check subscription : Admin panel -> Push Notifications - > Subscriptions. You can check subscription for user: Admin panel -> Users - > "your" user ->In the right side below "Tags" is placed list of the subscriptions.

RomanPronin avatar Oct 30 '17 17:10 RomanPronin

RomanPronin, it's already Subscribed.

roma50 avatar Oct 30 '17 17:10 roma50

@roma50 did you try to send push notifications from admin panel?

RomanPronin avatar Oct 30 '17 17:10 RomanPronin

Yes. Sent but not received anything in app checked log also.

roma50 avatar Oct 30 '17 17:10 roma50

Ok, give us your Application ID, we will check it on backend side.

RomanPronin avatar Oct 30 '17 17:10 RomanPronin

Application ID is 12

roma50 avatar Oct 30 '17 17:10 roma50

So, your Quickblox APP_ID is 12? Are you sure? With this APP_ID you do QBSettings.getInstance().init(getApplicationContext(), APP_ID, AUTH_KEY, AUTH_SECRET) ?

RomanPronin avatar Oct 30 '17 17:10 RomanPronin

Yes

roma50 avatar Oct 30 '17 18:10 roma50

Application ID is 62670

Sent but not received,auth_key has config

{"notification":{"id":9874380,"badge":null,"device_token":null,"sound":"default","alert":null,"data":{"message":"test111","collapse_key":"event21365996"},"expiry":86400,"delivered":false,"delivered_at":null,"failed":true,"failed_at":"2017-11-02T01:41:51+00:00","fail_after":"2017-11-02T02:41:51+00:00","retries":0,"error_code":401,"error_description":"Unable to deliver notification 9874380, received error 401 (Unauthorized, check your App auth_key.)","deliver_after":null,"alert_is_json":null,"app_id":12925,"collapse_key":null,"delay_while_idle":false,"registration_ids":["dYSotp1rXfM:APA91bEijjQg024ezGewA2SaoMQ0Z6pEx9SDi_8nHsxb_CsOCsh9USh-uZZXNdx_2j_rjHhyoYshh4PKr_TmE0uZ-cXeC7VqDS-s2zvKevWvpe1kD4WJgwkHeQyp5amIuKZb8n_NdBot"],"uri":null,"priority":10,"url_args":null,"category":null,"content_available":false,"mutable_content":false,"notification":null,"type":"Rpush::Client::Redis::Gcm::Notification","event_id":21365996,"event_date":"2017-11-02T01:41:50+00:00"},"log":[{"device_token":null,"delivered_at":null,"failed_at":"2017-11-02T01:41:51+00:00","error_code":401,"error_description":"Unable to deliver notification 9874380, received error 401 (Unauthorized, check your App auth_key.)"}]}

ideav5 avatar Nov 02 '17 04:11 ideav5

My android chat app doesn't receive incoming message in the background (can receive in foreground). I am using corn. quickblox: quickblox-android-SDK-messages: 3.3.3.

ntkhoi avatar Apr 09 '18 06:04 ntkhoi

@ntkhoi, In background app state chat service can be destroyed, so user may be in logout state. Thus you won't receive any realtime message. But you will receive offline message. So, the better way to handle correctly chat offline messages () is to do 'Chat logout' when app goes to background and does 'Chat login' when app goes to foreground.

RomanPronin avatar Apr 10 '18 13:04 RomanPronin

Hello,

I'm facing this same issue in only one case : Call from Android app to iOS app when the iOS app in the background.

At this stage, I'm not receiving any kind of push notification in iOS app and even it is not showing in the Queue in the dashboard as well. I've tried sending manually from the dashboard and it is working and receiving the push to iOS.

kushal211 avatar May 11 '18 17:05 kushal211

Just to help you guys for call push notification for iOS to Android, you need to change these in your iOS application.

  1. Go to QMCallManager.m
  2. Find method - (void)callToUserWithID:(NSUInteger)userID conferenceType:(QBRTCConferenceType)conferenceType
  3. Change the below code in the method.
[QMNotification sendPushNotificationToUser:opponentUser
                                          withText:pushText
                                       extraParams:@{
                                                     QMVoipCallEventKey : @"1",
                                                     @"type" : @"push_type_call",  // These is required for Android app
                                                     }
                                            isVoip:YES];

by changing these I'm able to solve the issue of call push for iOS to Android. Still having issue with Android to iOS.

kushal211 avatar May 11 '18 17:05 kushal211

Hi @kushal211, check out latest Q-mun version 2.7, the background calls work cross-platform.

RomanPronin avatar May 14 '18 08:05 RomanPronin

Hi I am getting notification when video calling from other app and notification is showing,but app is not opening when app closed or device locked, Please help me

Sukhwal avatar Jan 10 '20 18:01 Sukhwal

@Sukhwal I am facing problem when the iOS app has in background mode and if the Android user initiate the call. This condition iOS app not getting notification from another platform. iOS to iOS working fine.

silicus-kirankhalkar avatar Aug 24 '20 05:08 silicus-kirankhalkar