• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to read text from an SMS that just arrived?

Daniel Fernandes

Android Enthusiast
Aug 20, 2016
535
699
Hi, as some of you may know, I am fairly new to Android development. I want to make an app, which can be used to recover my phone if it gets lost. The idea is that, the phone receives an SMS text message with a keyword. The app will read the message. If the message contains the keyword then it will perform certain commands. For now, I want it to only play an audio file once the keyword is received. I have designed the UI. It's just a switch that turns the app on and off.

So, I want to know how to keep the app in background, then to receive the message and check if the message contains the keyword and play an audio file that will be inside the APK.

Oh, I also need to make a button to stop the audio once it plays... I'll make it now...
 
  • Like
Reactions: nighthawk33866

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones