Receive sms in own android application

To get notification of received sms we will use BroadcastReceiver.
So create new class with any name like SmsReceiver and extend it with BroadcastReceiver.
Code with description is given following.

In AndroidManifest.xml use following lines in <application></application> tag