Post not yet marked as solved
Hi.
I'm fixing issue of my push to talk app behavior.
While I'm joining Push To Talk channel, then I uninstall application, application does not exist but system shows PushToTalk status in status bar with blue button.
I want to automatically leave channel after uninstall app, but now I cannot handle this behavior.
If there is some expected behavior of apple, I want to know it but I cannot find their expectation in any document. Does anyone know it?
best regards.
Post not yet marked as solved
I'm facing an issue where I can't play an audio file stored in my project after receiving a push-to-talk notification. Strangely, I'm able to play the audio file by tapping on a button before receiving the push notification, but it doesn't work afterward without any error messages. I've ensured that I've set up everything correctly in my project's capabilities. Any insights on what might be causing this issue would be greatly appreciated.
I set everything in capabilities
Set permission in .plist
Request permission in app delegate
I make connection to the room when app becomes active and received succes
Then I setup .halfDuplex for this channel
In restoredChannelUUID I activate AVAudioSession
After sending the ppt push, I parse speaker and make it activeRemoteParticipant.
I see than delegate function channelManager didActivate works good
Where I tried to play audio from my player
I see this prints in console, but no sound play
Post not yet marked as solved
Hello,
We're interested in using the PTT Framework with our PTT capable hardware, as the framework has intended. The problem is activating Siri with any of our specified Intent's doesn't work when the phone is locked.
The iPhone always says "You'll have to unlock your iPhone first".
Reading up on the problem, it seems pretty common in the fact that Apple doesn't allow Siri Intents to be executed while the phone is locked.
It's a sensible precaution by default, but there are countless threads of real use cases that users want to use Siri without unlocking (with PTT, or well, without).
There appears to be no options for PTT to enable this, any flags on the Siri Intent to allow benign App actions or queries, user UI configuration through Settings -> Siri & Search to manually allow it even when the phone is locked. Neither are there any entitlements (that I'm aware of) that would allow trivial and non-secure Siri App Intents.
The only advice we have for our users (and albeit against the intention of the limitation in the first place) is to: Disable Auto Lock, Disable Face ID and to Disable Passcode.
It is in fact 2024, and users do expect a better experience than this with Siri, or am I missing something?
Post not yet marked as solved
1- Did activate audio session get called in both receiveing and transmiting what the best practice to handle Playback & Recording.
2- how to playback audio after that cuse in background websocket get killed "Software caused connection abort".
Thanks in advance.🙏🏻
Post not yet marked as solved
Hello,
I am approaching the recent PTT Framework as my desire is to create a Walkie Talkie app. I watched the video and followed the documentation. I haven't managed to get it working yet, as there are some steps that aren't 100% clear to me.
But the biggest doubt right now is: if I manage to create a walkie talkie App that works with PTT Framework on SwiftUI, will I be able to integrate this functionality in some way with the Android version of the same App? I don't know if it's worth mentioning but my backend right now is Firebase.
Post not yet marked as solved
Our PTT framework app works great but we have now found an interesting scenario where you can get the PTT Framework in a state that is non functional.
Here's how it can be reproduced:
Start your PTT app ( With PTT framework ) Successfully joined channel and we can transmit and receive incoming transmits.
Put app in background. ( PTT framework/GUI symbol present in top)
Wait 1 min
Restart phone by pressing volume up + right side button
Wait 1 min
Start phone
We can now get two scenarios:
"Sceanario *1": In 4 of 5 cases the PTT framework symbol will be present directly when phone is started.
If we here start running our app we can see that the channel is restored and everyting works perfectly.
"Sceanario *2": In 1 of 5 cases the PTT framework symbol is not present after phone is started, and will not be even if waiting.
If we here start running our app we can see that the channel is also here restored (channelDescriptor(restoredChannelUUID channelUUID: UUID) -> PTChannelDescriptor) and we can successfully call "mgr.setTransmissionMode(newTransmissionMode, channelUUID: self.channelUUID)" on our channel ( PTT framework symbol still not present !!!!)
If we now try to call "requestBeginTransmitting(channelUUID: UUID)" we will get the PTChannelError error channelNotFound !!!!
We are then reacting to this and trying to do leave the channel "leaveChannel(channelUUID: UUID)" but also this is returning PTChannelError error channelNotFound in "channelManager(_ channelManager: PTChannelManager, failedToLeaveChannel channelUUID: UUID, error: Error))" !!!!
The interesting thing here is that my log is saying the following:
PTTFrameworkImpl: failedToLeaveChannel 6D5AFE96-9389-4CFB-893A-64D51D4542XX error=The operation couldn’t be completed. (com.apple.pushtotalk.channel error 1.), joined=true, activeChannelUUID is=6D5AFE96-9389-4CFB-893A-64D51D4542XX.
So we are getting channelNotFound for 6D5AFE96-9389-4CFB-893A-64D51D4542XX but when at the same type checking active channel with channelManager.activeChannelUUID we are getting 6D5AFE96-9389-4CFB-893A-64D51D4542XX.
After this we logout our user in our app.
If we now try to login again we will get a scenario where "requestJoinChannel(channelUUID: UUID, descriptor: PTChannelDescriptor)" will result in just NO RESPONS in means of
"channelManager(_ channelManager: PTChannelManager, didJoinChannel channelUUID: UUID, reason: PTChannelJoinReason)" or "channelManager(_ channelManager: PTChannelManager, failedToJoinChannel channelUUID: UUID, error: Error)"
FYI: The fault are occuring on 17.3 also and the syslog I provided here is on 17.3 developer beta
One interesting observation we have seen is that we only see this problem when "allow location access" is set to never for our app.
Post not yet marked as solved
Hello,
I am reading up on the documentation and seems to have some discrepancies but wanted to double check.
In Overview for PTChannelManager, it states "Multiple calls to channelManager(delegate:restorationDelegate:completionHandler:) result in the system returning the same shared instance, so store the channel manager in an instance variable." https://developer.apple.com/documentation/pushtotalk/ptchannelmanager
However if we look at the documentation for creation of a channel manager,
in the completionHandler, it states that it will return "A new channel manager instance."
https://developer.apple.com/documentation/pushtotalk/ptchannelmanager/4031737-channelmanager
So is it a shared instance that gets returned or will a new instance be created? Need to know if we will need to implement a multiDelegate Pattern or not for this scenario for example if someone else called this function, would they take over the callbacks or would they get their own instance?
Thank you.
Post not yet marked as solved
How to programmatically leave a channel when an app is forced closed? Currently when a user closes the app, the channel remains active and can still talk via the status bar. However i imagine if a user force closes the app, they no longer want to talk.
I tried implementing this via func applicationWillTerminate(_ application: UIApplication) { // leave channel code }
but it doesn't seem to work
Post not yet marked as solved
Can you please post the sample code?
I am receiving a push through "incomingPushResultForChannelManager" of Push to talk Framework and setting a remote participant through "pushResultForActiveRemoteParticipant" or setting a remote participant using "setActiveRemoteParticipant" directly in the PTT App without receiving a push.
When the app establishes a remote participant on a channel, an Audio Session is started anew and will receive an active Audio Session.
The problem is that the time to activate this Audio Session is not short.
For this reason, there are many cases where the first part of the other party's voice passes without being played.
Also, if the app is running in the foreground, even if it doesn't acquire a new audio session, it can play the voice through the app's own audio session. However, by restarting the Audio Session, the Audio Session is changed unnecessarily and the voice playback is delayed.
Question. Can I set the Audio Session to not change when setting the remote participant's information?
If this is not possible, please advise on a solution for the case where the audio session is activated after the voice starts to be received.
Post not yet marked as solved
I was just watching the Enhance voice communication with Push To Talk WWDC22 session video and was wondering (a few questions) --
(1) (when) will you be making the demo app available that was shown at the beginning of the video?
(2) There was some detail given regarding the new APNs push type ("pushtotalk"), but it was unclear to me if that's something I need to handle manually, or if those will be sent automatically when I do channelManager.requestBeginTransmitting?
(3) How does the audio data itself get routed around? Is that handled by the system between the requestBeginTransmitting and stopTransmitting calls? Or somehow part of the APNs payload? Or something we must handle?
Thank you!
thanks!!
Post not yet marked as solved
Hello,
Do you recommend to use Push to Talk for Voip apps ?
Post not yet marked as solved
So I have been able to get my app to record and receive PTT on the foreground successfully but when pressed the talk button in the system UI or when my app is in the background, the audio session is never activated hence func channelManager(_ channelManager: PTChannelManager, didDeactivate audioSession: AVAudioSession) never get called.
My question is, is there any step or requirement that might prevent the system UI from activating the audio session even though the same code works perfectly fine whenever the app is in the foreground. I appreciate your help in advance.
Post not yet marked as solved
I tried to press system Talk button to talk in channel when my APP in background, I see the channelManager(_ : PTChannelManager, _: UUID, didBeginTransmittingFrom _: PTChannelTransmitRequestSource) is called, but the function func channelManager(_ : PTChannelManager, didActivate _: AVAudioSession) never called.
When my APP in foreground, everything works fine. I've set the APP's capability Background Modes -> Push to Talk.
Anyone can help?
Post not yet marked as solved
I'm implementing Push To Talk functionality on my app.
Now I have some trouble after app process is terminated by user.
In my implementation, I download voice file in func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) method. It works fine when app is foreground, and also ok when app is background until app process terminated.
After app process terminated, system displays PTT connection status by blue icon in status bar. Then I got some PTT message from another person, func incomingPushResult(channelManager: PTChannelManager, channelUUID: UUID, pushPayload: [String : Any]) and func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) are called, but download process is not finished and I cannot get voice file.
What is the expected way to download voice file in such case?
I am using the same ChannelManager, however when switching to another channel, I leave the channel and then requestToJoin a new channel with the new inputted ChannelName and PTDescriptor however the name and image are not changing when I go to background to see the Native UI. Am I missing something to call for an update for the PTDescriptor?
Post not yet marked as solved
When the app is open and the pushtotalk notification is sent to the app the app calls following functions
func incomingPushResult(channelManager: PTChannelManager, channelUUID: UUID, pushPayload: [String : Any]) -> PTPushResult {
func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) {
Once the app goes into background mode only pt 1 function is getting called and not pt 2 function. Could you pls clarify how to resolve this issue. Also i get error sometimes
2023-05-10 07:47:55.655278+0530 bhnonlineazan[674:48861] [connection] nw_read_request_report [C3] Receive failed with error "Socket is not connected"
Post not yet marked as solved
I'm looking to see if someone could point me in the right direction in terms of understanding what's needed for to host a backend server for the new Push To Talk API. Additionally, I'm curious to know what type of latency times people are getting. We've ran a mumble server which unfortunately had a considerable amount of latency.
Post not yet marked as solved
hi , trying to call begin transmission method by System UI, but I cannot wait for the framework to call this method
func channelManager(
_ channelManager: PTChannelManager,
didActivate audioSession: AVAudioSession
)
If this method cannot callback, I cannot Configure our audio session and begin recording, I don’t know how to that?
Post not yet marked as solved
How to reproduce:
Launch ptt app
join channel
call requestBeginTransmitting
in delegate method didActivate audioSession prepare AVAudioRecorder and call record
Error: AVAudioRecorder.record() returns false
If I reinstantiate and run AVAudioRecorder.record() right away then it returns true. It happens only on first audio recording after app launch.