J Juzer Hussain Active Member Licensed User Longtime User Dec 6, 2021 #1 Hi, I need to read sms. My app is not to be on play store. I am trying to run the code as in https://www.b4x.com/android/forum/threads/reading-sms-in-the-background.124180/#post-776115 but in the service service starting: If StartingIntent.Action = "android.provider.Telephony.SMS_RECEIVED" Then It fails. Error java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 I have added permission in manifest. After starting the app i send sms to my phone but it does not read the sms. Is there any way out. Pls guide me. Thanks Juzer
Hi, I need to read sms. My app is not to be on play store. I am trying to run the code as in https://www.b4x.com/android/forum/threads/reading-sms-in-the-background.124180/#post-776115 but in the service service starting: If StartingIntent.Action = "android.provider.Telephony.SMS_RECEIVED" Then It fails. Error java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 I have added permission in manifest. After starting the app i send sms to my phone but it does not read the sms. Is there any way out. Pls guide me. Thanks Juzer
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2021 #2 This code cannot throw the posted error message. Please post the full error message from the logs. Upvote 0
J Juzer Hussain Active Member Licensed User Longtime User Dec 7, 2021 #3 Its WORKING Erel, Sorry, The error was coming while reading the array. One has to start service and wait for SMS. Upon receiving SMS if condition will be met automatically. Thank You . Juzer Upvote 0
Its WORKING Erel, Sorry, The error was coming while reading the array. One has to start service and wait for SMS. Upon receiving SMS if condition will be met automatically. Thank You . Juzer