I'm pretty sure there was a way to add parameters to intent on launch of app from android studio (simulate opened from push notification).
Do you know how to do it?
You are right. It is completely possible. If you check the am command's help, you will see that we can pass arguments using -e.

So, follow these steps:
1. Edit launch configurations:

2. Add the desired arguments in the Launch Flags box, then press Apply and OK:

3. Now the passing argument will be available in the launcher activity's extras:

I assume you handle the intent yourself.
In this case it's always possible to add an Extra to an Intent, as long as the object you try to pass a parameter is either implements Parcelable or Serializable.
So your process could look like:
In the activity starting class
Intent launch = new Intent(this, NewActivity.class);
launch.putExtra("parcelable", new ParcelableObject());
startActivity(launch);
In the new activity
Intent from = getIntent();
ParcelableObject pojo = from.getParcelableExtra("parcelable");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With