Hey, Im trying something in android, that has to get the words sent in sms and print on the emulator screen. But the app doesnt update in time.
I send a message. Ok.
You could move all most of the code in the OnCreate() to onResume within your activity. Basically you should query the content resolver within the onResume so that you get a fresh set of the data when your activity is in the foreground. Without this you are getting a snapshot when the activity is created. It's going to be paused when you go to the SMS screen and then resumed when you go back to it. It is still alive even though you switched apps so the onCreate won't be called until the activity is either killed or finished and then rentered.
So in short move the ContentResolver.query() to the onResume. And display your state there.