The application has stopped receiving text messages in the background

A stayawake routine might allow you to set ReceivingEnabled properties to 2 instead of 3 . The app will ‘run’ constantly , especially if you keep your device’s charger plugged in. The app will not go to sleep while stayawake runs so ReceivingEnabled Foreground (2) should work fine instead of Always (3) and will receive all text messages. Experiment to see what works for you. I agree, option does not appear to be working like it did prior to Google (and phone providers) changing how they handle sms messages. I expect that is partially because how some phone providers handle queued sms messages but I do not know. I do know is option 3 does not work exactly as advertised in the documentation.

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 .

Google changed how texting is allowed to work in Android in late 2018. The old ways do not work. When I set ReceivingEnabled to 3 it seems to work sometimes, sometimes it does not. When it is working and sends messages from queued messages, it is very annoying so it requires disabling the feature prior to allowing your app to go to sleep. When that happens for me, it creates issues. This is what the documentation says ... When a message arrives, the MessageReceived event is raised and provides the sending number and message. 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, moreso, 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. As an app developer, you’ll probably want to give your users the ability to control ReceivingEnabled so that they can make the phone ignore text messages. I expect for most users, this is unacceptable behavior.

The documentation says with regard to Texting

ReceivingEnabled If set to 1 (OFF) no messages will be received. If set to 2 (FOREGROUND) or 3 (ALWAYS) the component will respond to messages if it is running. In the case of 2 (FOREGROUND), messages received while the app is not running are discarded. In the case of 3 (ALWAYS), messages receive while the app is not running will show a notification. Selecting the notification will bring up the app and signal the MessageReceived event. Messages received when the app is dormant will be queued, and so several MessageReceived events might appear when the app awakens. As an app developer, it would be a good idea to give your users control over this property, so they can make their phones ignore text messages when your app is installed.

Might appear is the issue. , you are not getting them and I get them erratically. So, I would not use the sms for anything other than option 2 and be happy.

You didn't share your code that used to work or tell us whether you are compiling using the Companion with a " u " in its version.

@ewpatton ..1. shouldn't that gem be in the documentation? 2. Option 3 does not work as advertised. Have you tried it?

Regards,
Steve