Android/에러해결

SMS Retriver API

lipnus 2019. 1. 20. 20:46
반응형

java.lang.IllegalArgumentException: Receiver not registered



https://stackoverflow.com/questions/6165070/receiver-not-registered-exception-error



/** mRetrieverClient 종료
*/
@Override
protected void onStop() {
super.onStop();

try {
this.unregisterReceiver(smsReceiver);
}catch (Exception e){
}

}

smsReceiver가 이미 unregister되었는데 이게 발동되면 Exception. (??)

try ~ catch로 묶어줌.

반응형