You can transfer data as additional functions in the intent that triggers the second action:
Intent myIntent = new Intent(view.getContext(), NextActivity.class); myIntent.putExtra("extra", id); startActivityForResult(myIntent, 0);
In the oncreate method of your profile activity, you can access additional functions:
int id = getIntent().getStringExtra("extra");
If you're new to Android, this can help read examples in developer docs, like a notepad tutorial.
source share