Estoy desarrollando una app que recibe un SMS pero al hacer las pruebas los mensajes llegan y Android los recibe, pero la app recibe algunos y otros los ignora.
The documentation says:
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.
The problem of not receiving all texts could be an issue related to your cell provider, your Android version etc. New Androids might get fussy with this feature as Google tightens security protocols and might not work in the background with some Android phones.
What version of Android are you using Jose? You might try a different phone and make sure you set ReceivingEnabled to Always (#3)
Me pasa lo mismo, uso el evento Cuando MenssageReceived y ReceivingEnable como Always y aún así unos mensajes si los lee la aplicación y otros no, estoy buscando la causa pero no la hayo, alguien que sepa la causa y solución del percance?
Welcome @CuadXAccion_CuadTour
The same thing happens to me, I use the When MenssageReceived and ReceivingEnable event as Always and still some messages if the application reads them and others not, I am looking for the cause but there is no one, someone who knows the cause and solution of the mishap?
I assume you read the advice in note #2. If you set up the Texting properly you should capture as indicated in the advice.
Messages received while the app is not running are discarded if you use case 2 FOREGROUND.
In In the case of 3 (ALWAYS), messages received 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
What messages you receive depend on how you set the MessageReceived; whether your device is alive when the message arrives on your phone or whether your phone is sleeping or turned off.
Other factors might be factors could be receiving long messages (longer than 170 characters), multi-media etc. What is different about the messages you receive and don't receive?