How to reset phone event

i have a very small app that gets the phone number from incoming calls puts phone number in textbox and sends sms to the phone number

it woks fine for the first phone call, but fails to respond to any additional calls
the whole app is a single code block
am i missing something? do i need to reset the phone1 component?

No one knows Peter; you did not share an image of your 'very small app'.

A guess is that the sms cannot be sent while the phone is engaged. You may need to send the sms at some time after the phone call completes or something else or this might be involved with whether the sms is sent with the Send message or with the send message direct block. Or whether you use the PhoneCallStarted or PhoneCallEnded event handler to trigger the sms.

A more detailed explanation of what you mean by

might provide someone with more ideas.

sorry for that, had to figure how to post the code blocks, to try to be a bit more clear, any phone call is not answered (mostly just hung up), or ring out, for the first call, the phone number is displayed, the text is sent and the textbox is updated to "waiting"
any subsequent calls just keep ringing, without response from the app

from my experience (non-progamatically) i can send sms while on a call
i just wondering if i set the phone status to 0 if it would help?

PhoneCall

Texting explain how the Phone and sms objects work.

w.r.t. Phone
PhoneCallEnded( status , phoneNumber )Event indicating that a phone call has ended. The status can be any of:

  • 1 : Incoming call was missed or rejected
  • 2 : Incoming call was answered and hung up
  • 3 : Outgoing call was hung up.

PhoneCallStarted( status , phoneNumber ) Event indicating that a phone call has started. The status can be any of:

  • 1 : Incoming call is ringing
  • 2 : Outgoing call is dialled

You can experiment . 0 is NOT an option available; but you can try it, not all options are necessarily documented.

You do not 'Clear' TextBox1 Waiting message, possibly you should use the PhoneCallEnded with a status of 1 or 1 and 2 to clear the content of textBox1?. Also, you might add, at least temporarily another textbox so one holds the phone number and the other the status message?

Your app, you got to experiment. Eventually you should find a solution and can let us know what happens and works. :slight_smile:

note that while that is true in your case, it might not be permitted when using both the Texting and Phone call components. I don't know, so you should consider that possibility.

thnx steve, i only really put the status message so i could see what is happening, while developing, in real life, no one will look,
initially the textbox displays "starting", then the phone number shows, then changes to "waiting", but so far, no further updates on subsequent calls

it appeared to work correctly for the first call at least

i might look into restarting the app after each call