How to get the intention of the main launch Activity from another activity?

I am currently engaged in other activities. How can I get the main launch of an Activity Intent?

Intent launchIntent = getIntent();

In the above example, obviously getIntent()will not give me the correct Intentone that I need.

How can I get the main launch Activity Intent?

+4
source share
2 answers
import android.os.Bundle;

Bundle extras = getIntent().getExtras();
   if (extras != null) {
       pics = extras.getInt(KEY_HERE);
   }

Replace pics and getInt as needed.

0
source

When it Activity1boots up, take Bundleit associated with the launch.

When it starts Activity2, put the same extra features in your new one Intentand pass it on Activity2.

Intent , .

0

All Articles