Comments (25)
For sending APNS_VOIP
notification from Android just add the next parameter
json.put("ios_voip", 1);
to your JSON.
About specific parameter for push notifications you can read there https://developers.connectycube.com/server/push_notifications?id=universal-push-notifications
from android-messenger-app.
@TatankaConCube I tried adding that key to my json, but still the same. The notification appears on the Admin Panel, but the iOS device doesn't start the incoming call UI. The iOS can receive normal notifications though, it's only VOIP ones that are missing.
Here's a video of it in action:
https://drive.google.com/file/d/1WCb4ItX4lJFRuGmmK6xNVSK9fBcBmdf5/view?usp=sharing
from android-messenger-app.
Can you please provide more status info about this notification? For it click on the 'sent' link on your screenshot and download JSON with the full report.
from android-messenger-app.
Additionally provide to us logs from the logcat with event creation
from android-messenger-app.
@TatankaConCube here are the complete logs:
ConnectyCube Admin Panel notification json file:
3438214_log.json.gz
Chat initialization log:
connecting_to_chat_log.txt
Sending notifications log:
sending_notifications_log.txt
from android-messenger-app.
I will study your data tomorrow. For today try to delete this parameter event.setPushType(ConnectycubePushType.APNS_VOIP);
and add json.put("ios_voip", 1);
as I wrote before. In this case, SDK will send a universal push notification, and type will be used from your json.
from android-messenger-app.
@joeyoggie did you try my latest suggestion?
from android-messenger-app.
@TatankaConCube Yes, I tried it when you first suggested it, but it was the same result. Notification sent and shows on the Admin Panel, but it's nothing on the recepient iOS device.
from android-messenger-app.
Did you delete pushType
parameter from the event?
from android-messenger-app.
Yes, indeed. I removed it and added 'ios_voip' to the json payload.
from android-messenger-app.
Hmm, it should work. Can you please provide the same log from the admin panel for the event, sent from iOS?
from android-messenger-app.
@TatankaConCube sorry we had some issues in our BE server.
Here are the logs:
Android > iOS: (nothing received on iOS device)
3672087_log.json (android to ios).gz
iOS > Android: (works fine)
3672127_log.json (ios to android).gz
Edit: By nothing is received on iOS, I mean no VOIP calling received, I still however receive a normal notification message with 'Incoming Call. Tap to answer or reject' text I send in the 'message' field in the json payload.
from android-messenger-app.
I mean logs about worked push notification from iOS to iOS. Can you provide it?
from android-messenger-app.
hi @joeyoggie
just to confirm couple of things:
Do you subscribe for VoIP push notifications?
I mean , for iOS, you need to have 2 separate push subscriptions: one for normal pushes and another one for VoIP pushes.
Please confirm you do 2 push subscriptions on iOS
Here is more info regarding ios_voip
parameter:
ios_voip=1 - will initiate VoIP push notification for iOS if user has VoIP push subscription. Otherwise - iOS user will receive standard iOS push. For Android - it will be a standard push.
So if a user has only normal pushes subscription then it will be a normal push initiated, despite you provide ios_voip=1
.
from android-messenger-app.
@TatankaConCube the above notification is the same one sent from iOS to iOS. I'll try and get you another log for iOS-iOS notification payload soon
@DaveLomber Yes, iOS is subscribed to VoIP.
from android-messenger-app.
@TatankaConCube here's the iOS-iOS notification:
3713856_log (ios to ios).json.gz
from android-messenger-app.
@joeyoggie so
same request with same payload
iOS->iOS works, but Android->iOS is not?
from android-messenger-app.
@DaveLomber yeah exactly. iOS doesn't open the incoming call screen at all when calling from Android.
from android-messenger-app.
@joeyoggie please show a code snippet how you create an event from iOS
we need to compare with Android code above
from android-messenger-app.
@DaveLomber here you go:
let event = Event()
//event.notificationType = .push
var opponentID :UInt?
if let opponentTemp = self.view?.opponentUser {
opponentID = opponentTemp.id
}
else if CallVOIPHelper.instance.opponentId != nil {
opponentID = CallVOIPHelper.instance.opponentId?.uintValue
}
else {return}
//guard let userId = self.view?.user?.id else {return}
event.usersIDs = [opponentID!] as [NSNumber]
event.type = .oneShot
event.pushType = .APNSVOIP
var pushParameters = [String : String]()
pushParameters["message"] = "\(AppData.shared.isDoctorProfile ? AppData.shared.userData?.profile?.fullName ?? "" : AppData.shared.userData?.fullName ?? "")"
//pushParameters["ios_badge"] = "2"
//pushParameters["ios_sound"] = "app_sound.wav"
// custom params
if let session = self.session {
pushParameters["patientName"] = session.patientName
pushParameters["consultantName"] = session.consultantName
pushParameters["date"] = session.date
pushParameters["timeTitle"] = session.timeTitle
pushParameters["communicationID"] = String(session.communicationID ?? 0)
pushParameters["consultantImageURL"] = session.consultantImageURL
pushParameters["consultantEmail"] = session.consultantEmail
pushParameters["patientEmail"] = session.patientEmail
pushParameters["appointmentID"] = String(session.appointmentID ?? 0)
pushParameters["notificationType"] = NotificationType.call.rawValue
pushParameters["calluuid"] = UUID().uuidString
pushParameters["recieverEmail"] = AppData.shared.isDoctorProfile ? session.patientEmail ?? "" : session.consultantEmail ?? ""
pushParameters["opponentId"] = "\(self.view?.user.id ?? 0)"
}
print("DEBUG INFO: call notification push parameters : \r\n\(pushParameters.debugDescription)")
if let jsonData = try? JSONSerialization.data(withJSONObject: pushParameters,
options: .prettyPrinted) {
let jsonString = String(bytes: jsonData,
encoding: String.Encoding.utf8)
event.message = jsonString
Request.createEvent(event, successBlock: {(events) in
print("success")
}, errorBlock: {(error) in
print("error , \(error.localizedDescription)")
})
}
from android-messenger-app.
You do not need this event.pushType = .APNSVOIP
Just remove it as suggested above for Android
Then, also pass ios_voip=1
so it should be the SAME payload for both iOS/Android sides, please align
from android-messenger-app.
@DaveLomber ok will remove it, but it works with it anyway.
from android-messenger-app.
in this case, you will have the same data from iOS and from Android in your callback
from android-messenger-app.
@DaveLomber there's another issue, as you can see from the above screenshot, the iOS received the VoIP notification, but when we answer the call, nothing happens. It says 'BeSure audio connecting..." and that's it. It was working fine 10 days ago, and we haven't changed anything in the build as it's the same one on the App Store.
from android-messenger-app.
No activity for a long time. Closing... If you still have the same error, please create a new ticket with details.
from android-messenger-app.
Related Issues (20)
- base occupants_ids field must contain an opponent user id HOT 1
- ConnectycubeChatService.getInstance().isLoggedIn is false even after login HOT 1
- Can't find account key HOT 1
- No incoming call notification HOT 2
- Can we create a group dialog with 2 members and Add new members successively? HOT 6
- Android 10 ,11, and above HOT 13
- User Issue HOT 7
- Push is being sent to both environments even I'm defining only one HOT 1
- Call Reject and and accept through notification HOT 2
- base You don't have appropriate permissions to perform this operation HOT 3
- Call Ringing Status HOT 11
- Issue is a tech one heads Up HOT 1
- calling screen open when app is killed mode? HOT 3
- Admin dasboard not opening, Users getting base forbidden after login HOT 3
- App doesnt work in latest version. HOT 2
- Getting 9 chat dialogs in app only out 200+ chat dialogs as seen in dashboard HOT 11
- The SDK (Your Server ) is blocked in many countries HOT 2
- Connectycube android VideoChatWebRTCSignalingManager not getting assigned HOT 3
- ConnectyCube resets or deletes the user FCM Token from Firebase Messaging as well for the device after unsubscribe from pushes HOT 7
- How to send a list of chat messages from other screen than chat message screen HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-messenger-app.