Thursday, February 16, 2012

[android-developers] Re: receive sms application. need help.

Look at the following lines in your logcat:

> com.android.project.smsapp.Receiver}: java.lang.ClassCastException:
> com.android.project.smsapp.Receiver cannot be cast to
> android.app.Activity

Then, look at the following lines in your code:

> Intent i = new Intent(this, Receiver.clss);
> startActivity(i);
.
.
.
> public class Receiver extends BroadcastReceiver{

You are calling startActivity for a BroadcastReceiver. What on earth
are you trying to do there?

-------------------------------------------------
Ali Chousein
http://www.codeproject.com/KB/android/PayGol-Android.aspx
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment