Return the intent that started this activity.
This method retrieves any incoming intent to the activity.
1. Start an Activity named NewActivity.java and newactivity.xml.
2 In NewActivity.java, add the below to the onCreate. This will make sure the intent is not null.
if(getIntent() != null) {
// do stuff here
}
3. Compile and run!
Next Recommended Article: getExtras - How to Retrieve a map of Extended Data from Intent
Next Recommended Article: getExtras - How to Retrieve a map of Extended Data from Intent