zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

Android Intent之Action应用

Android应用 Action Intent
2023-09-14 08:58:31 时间

Log.i("txrjsms", "whereDoYouJumpFrom:"+getIntent().getPackage()); 结果是null

Log.i("txrjsms", "whereDoYouJumpFrom:"+getIntent().getAction()); 结果是:

07-13 16:08:10.007: I/txrjsms(7043): whereDoYouJumpFrom:action.add.recipient

在跳转到ContactListActivity中执行操作

public void onClick(View v) {
    Intent it = new Intent(mContext, ContactListActivity.class);
    it.setAction(TxrjConstant.ACTION_ADD_RECIPIENT);
    startActivityForResult(it, TxrjConstant.REQUEST_ADD_CONTACT);
}