Step: Android manifest
<receiver
android:name=".BootBroadcastReceiver"
android:enabled="true"
android:exported="true"
android:label="Start SMS on boot">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
</manifest>
Step: BroadcastReceiver