Manipulated the logic to control when the app should and should not listen to the receiving text messages.