Hello
to start activity from a BroadcastReceiver in the onReceive(Context
context, Intent intent) method do the following :
Intent myIntent = new Intent(context, MyActivity.class);
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
Hope that Helps
Regards
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);
maybe you should have set one more permission:
uses-permission android:name=android.permission.READ_SMS /
On Feb 15, 4:59 am, jitesh adnani jitesh@gmail.com wrote:
application starting and also knowing that a new sms has come. but
just then it shows that the application has stopped
added the permission, still no luck.
this is my logcat:
02-16 09:11:11.367: D/AndroidRuntime(8446): Shutting down VM
02-16 09:11:11.367: W/dalvikvm(8446): threadid=1: thread exiting with
uncaught exception (group=0x40a251f8)
02-16 09:11:11.371: E/AndroidRuntime(8446): FATAL EXCEPTION: main
02-16
What is the problem to get over?
On Feb 13, 8:22 pm, jitesh adnani jitesh@gmail.com wrote:
ive been stuck on some problem when trying to handle incoming sms
message and to toast them. have no idea how to get over the problem.
please help.
this is my main java file - SmsApp.java
package
application starting and also knowing that a new sms has come. but
just then it shows that the application has stopped unexpectedly.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
6 matches
Mail list logo