App crashes when sending text message

I’m trying to send a text message but when I do my app crashes.

I can run my app fine if I disable the send message block. When I enabled it and export it and then install it on my phone, I can’t send a txt msg without it crashing.

Thanks for any help.

2019-04-30_155619

Any crash message?
I suggest you move your text debbug before the call for the message,

Also setup these blocks. Try to dump those to a notify, alert, etc.

I think it is an issue with a character type or length in your text.

Please add a apk

I added the .Error block but when the error happened, the app just crashed and no .Error data displayed.

I have included the Test.apk file. Please fill in your cell phone number.

2019-04-30_200451

Test.apk (5.1 MB)

Have you set the number where the message to be sent first?

like this?

image

Yes I populated my cell phone in the designer component. I removed it when I exported it for upload to this thread.

I’ve updated my sms text messaging app to include error messages when I click the send button. See attachment below.

One think I recall is that when I was developing under Thunkable, the .SendMessage block didn’t work either. I had to end up using their .SendMessageDirect block, but I see here at Kodular we have no such block. I don’t know what the difference is, but on Thunkable, .SendMessageDirect worked fine.

The error message I am getting now is: Current process does not have android.permission.READ_PHONE_STATE
When I look at the apps in Setup->Phone Permissions I don’t see my “Test” app. So that’s a problem, maybe the problem.

SMS Permissions does show my Test app so that’s fine.

BTW I saw this post with the same problem and Taifun sugggested adding the Phone component. I did that but that didn’t make any difference.

RESOLVED – please read my last edit update at the end of this post for how I resolved my problem.

Test.apk (5.5 MB)

I resolved my problem by adding the two permissions shown below in the red box: