Not receiving text messages

Hello
The problem is in not receiving text messages. After the phone screen goes blank, text messages are not received and saved to the phone label. Settings in the properties TEXTING1 Receiving Enabled = always.
How to solve the problem or are there already such ready-made applications?

Show your blocks

Welcome Levi.

Are you using Companion 2.60u ?

This is the documentation for Texting

Yes but the tutorial for NoTextingWhileDriving is outdated.
That tutorial was written in about 2013. It was written before Google required major security changes to the Android operating system. The tutorial is 'out dated' and will not even work with an Android unless you make adjustments to the Block code . The following discussion describes the issues and the changes a developer must make to get the tutorial to work with an Android device. Make sure you make the simple adjustments. Unfortunately, Texting (sms) must be tested on a real device. You cannot use an emulator or iOS.

see No text while driving compiling not working - #3 by SteveJG

2


:slight_smile:

Where do you set message and phone mumber of texting.

I just get messages. After the screen goes blank, I can't

Unfortunately for you Levi, that is the way the component works. App Inventor apps using Blocks cannot run in the background. When the app goes to sleep, your MessageReceived block cannot post the message to Label6 but the app is still probably receiving text messages. Look for the messages using your device's Texting app. They should be in the message que. However the messages will NOT post in your Label6 while asleep.

From the documentation:

An app that includes this component will receive messages even when it is in the background (i.e. when it’s not visible on the screen) and, more so, even if the app is not running, so long as it’s installed on the phone. If the phone receives a text message when the app is not in the foreground, the phone will show a notification in the notification bar. Selecting the notification will bring up the app.

This behavior doesn't happen with your app?

A solution to this behavior is to prevent the device from going to sleep using a StayAwake routine.

Here is how you might code a Stay Awake block routine using a Notifier

or you could use Taifun’s Tools Extension: https://puravidaapps.com/tools.php

Using either an extension or a block routine drains your device battery rapidly . These work around methods are not running the app in the Background, they force the app
screen to stay open .