If I send a broadcast with implicit intent, and there is no matching intent-filter, then what will happen?
Compile time error
It will throw run time exception - BroadcastReceiverNotFoundException, and crashes if it is not handled properly.
Nothing will happen, somehow it launches target component
Nothing will happen, but it will not launch any receiver.
Unlike startActivity() and startService(); sendBroadcast() will not throw any run time exception. If there are no target components available for this broadcast it will keep quiet. It is because in case of activity and service, action is yet to be performed but in case of broadcastReceiver action is already over and we are just informing it to every one.
Back To Top