Add support for registerReceiver and sendBroadcast