Init for broadcast receiver in MainActivity.