BroadcastReceiver在Activity中注册则要在其中注销
否则会报错
09-06 19:20:25.281 4952-4952/com.segway.robot.client E/ActivityThread: Activity com.segway.robot.client.update.view.UpdateInfoDialogActivity has leaked IntentReceiver com.segway.robot.client.update.model.UpdateDownloadReceiver@381311b that was originally registered here. Are you missing a call to unregisterReceiver()?
但是往往一些后台任务是不想在activity中进行注销的,这个时候可以使用application的context进行注册。