Hey,
Im tryin hard to finish an activity from my BroadcastReceiver... but
ending up in - java.lang.ClassCastException:
android.app.ReceiverRestrictedContext error.
Here is my code snippet let me know wat can be done,
public void onReceive(Context context, Intent intent) {
try {
if(intent.getAction().equalsIgnoreCase("alarm_call")){
Intent newIntent = new Intent();
newIntent.setClass(context,com.wipro.icici_phase_1.login.Login.class);
newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(newIntent);
((Activity)context).finish();
}
} catch (Exception e) {}
}
--
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