마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

abortBroadcast() 질문

0 추천
안녕하세요.

BroadcastReceiver 에서 SMS를 받고, abortBroadcast(); 를 호출하여 문자보관함으로 이동을 하지 않도록 하려고 합니다.

BroadcastReceiver 에서 SMS를 확인 가능하나 문자보관함으로 이동하지 않도록 설정한 부분이 먹는 폰도 있고, 안먹는 폰도 있습니다.

테스트한 단말은 아래와 같습니다.

- 갤럭시S2, android 4.0.2, SKT (문자보관함으로 이동 안함)

- 갤럭시S4, android 4.2.2, SKT (문자보관함으로 이동)

혹시 OS가 업그레이드 되면서 해당 기능이 막힌건 아닌지요?

답변 부탁드립니다.

 

카이에린 (140 포인트) 님이 2013년 9월 4일 질문

1개의 답변

0 추천

Sets the flag indicating that this receiver should abort the current broadcast; only works with broadcasts sent through Context.sendOrderedBroadcast. This will prevent any other broadcast receivers from receiving the broadcast. It will still call onReceive(Context, Intent) of the BroadcastReceiver that the caller of Context.sendOrderedBroadcast passed in.

This method does not work with non-ordered broadcasts such as those sent with Context.sendBroadcast

 

레퍼런스 문서에 보면 abortBroadcast 기능은 sendOrdererdBroadcast로 보내진 것만 동작됩니다.

sendBroadcast로 보내진 것은 동작이 안된다고 나와있습니다.

원조안드로이드 (58,190 포인트) 님이 2013년 9월 5일 답변
...