1.
Intent intent = new Intent(service, SendSmsDialogActivity.class);
intent.setAction("smsdialog".concat(String.valueOf(smsTask.getMsgID())));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
Bundle bundle = new Bundle();
bundle.putInt("msgID", smsTask.getMsgID());
bundle.putString("phone", smsTask.getPhone());
intent.putExtras(bundle);
service.startActivity(intent);
2.
public class SendSmsDialogActivity
extends
Activity
{
//
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
//#debug debug
System.out.println("<~~~~~~~> on new intent.");
openWithIntent(intent);
}
}