Giter VIP home page Giter VIP logo

Comments (25)

TatankaConCube avatar TatankaConCube commented on June 1, 2024

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.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.

image

Here's a video of it in action:
https://drive.google.com/file/d/1WCb4ItX4lJFRuGmmK6xNVSK9fBcBmdf5/view?usp=sharing

from android-messenger-app.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

Additionally provide to us logs from the logcat with event creation

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

@joeyoggie did you try my latest suggestion?

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

Did you delete pushType parameter from the event?

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

Yes, indeed. I removed it and added 'ios_voip' to the json payload.

from android-messenger-app.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

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.

joeyoggie avatar joeyoggie commented on June 1, 2024

@TatankaConCube sorry we had some issues in our BE server.

Here are the logs:
Android > iOS: (nothing received on iOS device)
image
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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

I mean logs about worked push notification from iOS to iOS. Can you provide it?

from android-messenger-app.

DaveLomber avatar DaveLomber commented on June 1, 2024

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.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.
image

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

@TatankaConCube here's the iOS-iOS notification:
3713856_log (ios to ios).json.gz

image

WhatsApp Image 2020-11-03 at 11 19 28 AM

from android-messenger-app.

DaveLomber avatar DaveLomber commented on June 1, 2024

@joeyoggie so

same request with same payload

iOS->iOS works, but Android->iOS is not?

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

@DaveLomber yeah exactly. iOS doesn't open the incoming call screen at all when calling from Android.

from android-messenger-app.

DaveLomber avatar DaveLomber commented on June 1, 2024

@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.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.

DaveLomber avatar DaveLomber commented on June 1, 2024

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.

joeyoggie avatar joeyoggie commented on June 1, 2024

@DaveLomber ok will remove it, but it works with it anyway.

from android-messenger-app.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

in this case, you will have the same data from iOS and from Android in your callback

from android-messenger-app.

joeyoggie avatar joeyoggie commented on June 1, 2024

@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.

TatankaConCube avatar TatankaConCube commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.