How do I implement a BroadcastReceiver in a Service Class in Android?
问题 I need to implement BroadcastReceiver in a Service class I have created: public class MyService extends Service in this class I have to implement a Simulation of Download by using Thread - Sleep when the user presses the button in the MyActivity Class which implements sendBroadcas(). I cannot extends the Service class to BroadcastReceiver as it is already extendes to Service. Can anyone help me to figure it out how to implement this mechanism? thanks 回答1: Have the BroadcastReceiver as a top