Closed stormbkk87 closed 7 years ago
Do you registered the audioChange function with callKit.register?
Yes, here's a code snippet. This code is called on "deviceready" event.
srixUC.prototype.registerVoipPush = function(){
var VoipPush = cordova.plugins.voippush.init();
VoipPush.on("registration", this.onPushRegister);
VoipPush.on("notification", this.onPushNotification);
var that = this;
this.callKit = new CallKit();
Meteor.setTimeout(function(){
that.callKit.register(that.onCallChanged, that.onAudioSystem);
}, 100);
};
srixUC.prototype.onCallChanged = function(data){
console.log("onCallChanged: "+JSON.stringify(data));
};
srixUC.prototype.onAudioSystem = function(data){
console.log("onAudioSystem: "+JSON.stringify(data));
};
Debug log in XCode looks to be notifying. I'm testing with the app activated, does CallKit not activate the incoming call screen if the app is activated?
Provider did reset
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED AUDIO NOTIFICATION: NSConcreteNotification 0x6080002421c0 {name = CDVCallKitAudioNotification; object = stopAudio}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
RECEIVED CALL CHANGED NOTIFICATION: NSConcreteNotification 0x608000246a20 {name = CDVCallKitCallsChangedNotification; object = <SrixM1.CDVCallManager: 0x600000424dc0>}
Once you got the Success callback on reportIncomingCall you should intialize AVAudioSession but don't set it to active. Apple docs says that you need only do this once you got the configureAudio callback, but this seems bugy: http://www.openradar.me/27674736 CallKit should display the call screen even if the app is on foreground.
Ok thanks I'll give that a try and report back. I'm using the iosrtc Cordova plugin.
Well, nothing seems to work on the Simulator, even the SpeakerBox example app. Can you even call it a Simulator if it doesn't simulate certain things. ;)
Works fine on a device. Thanks for the well organized plugin. :)
Hi there. I'm getting only "stopAudio" responses when calling reportIncomingCall. Am I missing something? Success function is called and has a UUID.