Scenario if message not received. Texting.MessageReceived

I’m authenticating the user with the mobile number using texting component. It works perfectly, if the correct number is given. Otherwise, Texting.MessageReceived is not triggered. this also works.

But I also want to check the condition -
if Texting.MessageReceived is not triggered,
send a message that the user has not entered the device phone number. Is this possible?

So you want to compare the real phonenumber with the number the user has entered in a textbox?

yes. that’s right

You could use this extension from @Taifun to get the phonenumber. See the note below the block.

1 Like

Besides the work with the phone component, you also
will need a little TinyDB work to check for a tag added
only after authentication has succeeded, to avoid having
to re-authenticate over and over from the same phone.

activate 1. screen.initialize
2. 1st line of block 2 ( call.texting.sendmessagedirect )
if sms received,
trigger block 3
trigger block 4
continue with block 4 (if condition)

is my understanding correct?. pl advice.

testing scenario

  1. give friend’s number, get notification (wrong no.) and go back to prev. screen with some startValue
  2. give correct number, get sms , save to tinydb and move to profile entry screen.
  3. give any number, should not accept ( as correct number is stored n tinydb)

Sorry, I don’t understand your app enough.

I can’t see the screen name you are starting in your blocks,
because you did not do a right click Download Blocks Image on a blank spot,
to get a complete image. Screen handling is tricky, and I avoid it,
using easier Arrangement hiding.

I don’t have a clear idea of your authentication timing, either.
Is this app meant to work with multiple friends sending your app texts,
and you want to whitelist the incoming text phone numbers
against a stored phoneNumber/Name list?

Maybe a swim lane diagram might help here.