0
브로드 캐스트 인 텐트를 수신하지 않는 싱글 톤 클래스의 브로드 캐스트 수신기가 있습니다.싱글 톤 클래스의 BroadcastReceiver가 의도를 수신하지 않습니다.
싱글 톤은 컨텍스트 (즉, getInstance (context))로 초기화됩니다.
getContext()를 호출합니다. sendBroadcast (intent); 하지만 BroadcastReceiver는 아무것도 얻지 못합니다. 의도 필터가 일치하는지 확인했습니다.
내가 수신기를 등록하는 방법은 무슨 일 때문에
private class Singleton(Context context) {
context.registerReceiver(mReceiver, INTENT_FILTER);
....
private onDestroy(Context context) {
context.unregisterReceiver(mReceiver);
....
처럼 내 싱글 생성자에!?