SMS interruption to a running app

218 views
Skip to first unread message

chris s

unread,
May 23, 2019, 3:55:47 AM5/23/19
to MIT App Inventor Forum
I'm hoping someone might be able to help.  I have an App Inventor app that has been operating happily for several years.  The App takes data from a received SMS, operates on the data then responds with an SMS back to the source of the original SMS.

In the last few days the App has started behaving in a different way to usual.  After the App successfully takes the data from the received SMS the Android device (phone) jumps to the messaging app and stops - waiting for the responding SMS to be manually sent.  Up until now, after the App Inventor App received the SMS, it sent the response SMS and continued with the running App - waiting for the next SMS to be received.

I'm using the same messaging app, the same App Inventor App and the same phone (although I have tried a different phone and it behaves the same (interrupted) way.

Any help would be appreciated.. 

TimAI2

unread,
May 23, 2019, 4:07:03 AM5/23/19
to MIT App Inventor Forum
Google have changed their policies, users can no longer automatically send sms or make phone calls the app must take the user to the corresponding default android app to confirm send. This affects all android developers, not just AI2
MIT have provided direct send sms/make call blocks in a companion available via the AI2 browser page (not play store). You can use these blocks to refunction your app, but you cannot upload this to the play store, it will be rejected by Google.

ABG

unread,
May 23, 2019, 9:37:53 AM5/23/19
to MIT App Inventor Forum

chris s

unread,
May 23, 2019, 7:19:16 PM5/23/19
to MIT App Inventor Forum
Hi Tim,
Thanks for your help, invaluable!. I don't use the Play Store and this app has been for personal use. It only became an issue a few weeks ago when I made a slight change to the App and it was re-compiled in AI2, from that time on the App has interrupted with the messaging window.  I'm assuming AI2 have changed the code for the messaging block causing the App to create this interruption.  How do I access the 'companion' via the AI2 browser - is it an extension I need to load?  I don't intend using the Play Store for this App.
Thanks again

Evan Patton

unread,
May 23, 2019, 11:52:54 PM5/23/19
to MIT App Inventor Forum
Hi Chris,

In your blocks you will need to replace the SendMessage blocks with SendMessageDirect. If you just want to recompile at this point you may. If you want to test with the companion, you will need to go to Help > Companion Information in App Inventor and you will be given a QR code and a link to retrieve a copy of the companion with support for the SendMessageDirect block.

Regards,
Evan
Reply all
Reply to author
Forward
0 new messages