Post

Replies

Boosts

Views

Activity

Reply to func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) not called in background
You can try to setCategory of audioSession in didBeginTransmittingFrom method. After I added this code, didActivate may be called. I had same issue , but It works fine by this logic. func channelManager(_ channelManager: PTChannelManager, channelUUID: UUID, didBeginTransmittingFrom source: PTChannelTransmitRequestSource){ try? AVAudioSession.sharedInstance().setCategory(.playAndRecord) }
Aug ’23
Reply to Push To Talk expected behavior when app terminated
Additional information: I could be download audio file in almost all of above case now, because I modified logic in func channelDescriptor(restoredChannelUUID channelUUID: UUID) -> PTChannelDescriptor method like following. func channelDescriptor(restoredChannelUUID channelUUID: UUID) -> PTChannelDescriptor { //1. some logic to restore channelDescriptor //2. I added following code try? AVAudioSession.sharedInstance().setCategory(.playAndRecord) return channelDescriptor } I modified like above because Framework engineer replies like following in this thread , and it look like working fine. The channelManager(_:didActivate:) method will not be called if the AVAudioSession was not able to be activated. This can occur if you have not enabled the Audio Background mode for your app and if you have not already configured your app’s AVAudioSession to include include the playAndRecord mode when the transmission begins. https://developer.apple.com/forums/thread/729421 But I found func incomingPushResult(channelManager: PTChannelManager, channelUUID: UUID, pushPayload: [String : Any]) is not called at first time I received some ptt notification after terminate app. I'm looking for the solution now.
Aug ’23