Closed kushal211 closed 6 years ago
@kushal211, Hello. Could you please enable full logs and send us this information?
[QBSettings setLogLevel:QBLogLevelDebug];
[QBSettings enableXMPPLogging];
Hi,
Yes I've log enabled and there are many logs generated in console. It is all working fine and perfect for iOS to iOS, iOS to Android. Just in case of Android to iOS.
Should I send you the logs from iOS ?
@kushal211, Could you please check that event's payload from android contains: "VOIPCall" : "1"?
@kushal211, Could you please print event(all keys and values) that you are sending from android? You're sending universal push, aren't u?(event.pushType parameter is omitted)
hi @VitaliyGuru ,
Yes, I've checked that thing and it was missing in Android app. So I've added that in the payload.
Here is the complete payload from the Android app:
{
message_type=push_type_call,
VOIPCall=1,
friends=[
49554268
],
message=leesaiscallingyou!,
ios_voip=1
}
Please note that I've added one extra key as well ios_voip and also tried with all the possible combination of the keys by removing them one by one but none of them got me success.
It is not even adding the push notification in the Queue of the push notification in my dashbaord.
@kushal211, Please provide code for creating the event with VOIPCall=1
in Android
Hi @VitaliyGuru ,
Here is the code I'm using in Android:
Public class CoreNotificationHelper {
public static QBEvent createPushEvent(List<Integer> userIdsList, String message, String messageType) {
StringifyArrayList<Integer> userIds = new StringifyArrayList<Integer>();
userIds.addAll(userIdsList);
QBEvent event = new QBEvent();
event.setUserIds(userIds);
event.setEnvironment(QBEnvironment.DEVELOPMENT);
event.setNotificationType(QBNotificationType.PUSH);
event.setPushType(QBPushType.GCM);
// Custom - For iOS VOIP Push
event.setPushType(QBPushType.APNS_VOIP);
setMessage(event, message, messageType);
return event;
}
private static void setMessage(QBEvent event, String message, String messageType) {
if (!setMessageWithTypeIfNeed(event, message, messageType)) {
event.setMessage(message);
}
}
private static boolean setMessageWithTypeIfNeed(QBEvent event, String message, String messageType) {
if (!TextUtils.isEmpty(messageType)) {
HashMap<String, Object> data = new HashMap<>();
data.put("data.message", message);
data.put("data.type", messageType);
// Custom - For iOS VOIP Push
data.put("data.message","1" );
data.put("data.type", "ios_voip");
data.put("data.message","1" );
data.put("data.type", "VOIPCall");
event.setMessage(data);
return true;
}
return false;
}
}
Note: You can check the code which is commented as Custom - For iOS VOIP Push which I've added in CoreNotificationHelper class
Hi @VitaliyGuru ,
Any update on the code provided?
@kushal211, Please use the code from the Android Q-municate.
And in the method createPushEvent
you should provide PUSH_MESSAGE_TYPE_CALL
for messageType
parameter and set the appropriate environment.
You shouldn't call setPushType
method in order to send universal push notifications(cross-platform).
@kushal211, Any updates?
Hi @VitaliyGuru ,
Yes, I've replaced the code as you mentioned and now it is working. Thank you so much for the help. :) 👍
The only problem sometimes I face is that it takes too long to receive a call notification.
Hi @VitaliyGuru ,
In android, sometimes, Chat history screen contains duplicate data in listview .. (Class :DialogsListFragment ) Thanks
Hi @leena12345
This is an iOS-only repository and we have nothing to do with android code. Please report all android issues to Quickblox Android repository here: https://github.com/QuickBlox/quickblox-android-sdk/issues
Hi,
I'm facing one issue with a specific case where I'm calling to iOS user from Android device and application is in the background in iOS, the push notification is not coming to the iOS device and it is also not showing in Admin panel "Queue" section.
All the other cases are working fine. I'm using Q-municate-android for the Android application.
Please help me with this specific case.
Note: I've tried sending VOIP push from the dashboard and it is working fine.
Thank you.