我正在尝试以下的sms示例:http: //mobiforge.com/developing/story/sms-messaging-android 但是如果我尝试发送消息,我会收到以下异常.
Exception:
02-07 12:38:15.447: ERROR/ActivityThread(839): Activity com.micro.MyTest has leaked IntentReceiver com.micro.MyTest$1@435a0c70
that was originally registered here. Are you missing a call to
unregisterReceiver()?
02-07 12:38:15.447: ERROR/ActivityThread(839): android.app.IntentReceiverLeaked: Activity com.test.SendSMS has leaked
IntentReceiver com.test.SendSMS $1@435a0c70 that was originally
registered here. Are you missing a call to unregisterReceiver()?
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.app.ActivityThread$PackageInfo$ReceiverDispatcher.<init>(ActivityThread.java:707)
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.app.ActivityThread$PackageInfo.getReceiverDispatcher(ActivityThread.java:535)
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.app.ApplicationContext.registerReceiverInternal(ApplicationContext.java:748)
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.app.ApplicationContext.registerReceiver(ApplicationContext.java:735)
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.app.ApplicationContext.registerReceiver(ApplicationContext.java:729)
02-07 12:38:15.447: ERROR/ActivityThread(839): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:278) …Run Code Online (Sandbox Code Playgroud)