Hello,
I've come across a strange problem reported by an HTC Droid Eris user,
and all testing on the other SDK's shows it to be fine. In a
BroadcastReceiver I have the following:
public class SMSReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
Object[] pdusObj = (Object[]) bundle.get("pdus");
SmsMessage[] messages = new SmsMessage[pdusObj.length];
}
Every time a text message is received, I get a force close with the
following in LogCat:
03-04 21:34:03.330: ERROR/AndroidRuntime(1243): Uncaught handler:
thread main exiting due to uncaught exception
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): java.lang.VerifyError:
com.myapp.app.SMSReceiver
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
java.lang.Class.newInstanceImpl(Native Method)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
java.lang.Class.newInstance(Class.java:1472)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2380)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.app.ActivityThread.access$2700(ActivityThread.java:112)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.os.Handler.dispatchMessage(Handler.java:99)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.os.Looper.loop(Looper.java:123)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
android.app.ActivityThread.main(ActivityThread.java:3948)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
java.lang.reflect.Method.invokeNative(Native Method)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
java.lang.reflect.Method.invoke(Method.java:521)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): at
dalvik.system.NativeStart.main(Native Method)
Any ideas would be appreciated. This seems to be working on every SDK
except for 1.5.
Thanks in advance!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en