I am making an app in which I will send a 4-digit verification code to the user by sms.. Then a dialog will open where the user has to enter the code. I want that when the sms comes, the 4 digit code automatically gets entered in the edit text. I can do it if I can read the message body of the new incoming messages, I did the code but it's not working.
I tried this and this solution.. But it did not work for me.. I am using Xiomi Redmi 1s android device and many times, there are codes which do not run on my device but run on other devices perfectly.. So please suggest any solutions.. Thanks in advance