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
Your BroadcastReceiver doesn't know anything about any activity by default. You will have to give the context to it, for example in your constructor when you create the broadcastReceiver.
private Activity activity;
public BroadcastReceiver(Activity activity) {
super();
this.activity = activity;
}
In you onReceive method you will now be able to use your activity in whatever way you like.