In my application I am sending a port SMS to the mobile. And when the message is recieved I need to perform some task in my activity and update the UI.
Manifest Decl
that ((VerifyActivity)context).msgReceived(msg); that's your mistake.
Why are you assuming that this context is your activity?
The best way (without 3rd party libraries) to do this is to send a local broadcast.
On this other answer I gave a general idea on how to use LocalBroadcast Best practice to launch AsyncTask from custom view
if you're Ok using 3rd party libraries I suggest you check Otto from Square