Thanks, Bob. That makes sense. It looks like I updated this when the
1.6 SDK came out.

Would it make sense to set my targetSdk back to 1.5 and start using
android.telephony.gsm.SmsMessage again, or, would I need to create a
new package altogether and only target API level 3?

Thanks again... this is my first encounter with the infamous
fragmentation issues I've heard so much about.

On Mar 4, 11:22 pm, Bob Kerns <[email protected]> wrote:
> Check the Javadoc. SmsMessage was introduced in API level 4 (1.6). It
> doesn't exist in 1.5 (API level 3).
>
> On Mar 4, 8:39 pm, g1bb <[email protected]> wrote:
>
>
>
> > 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!- Hide quoted text -
>
> - Show quoted text -

-- 
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

Reply via email to