How can I create an if statement based on what the previous activity was? I get to the page from an intent but it is not always from the same activity. I want some code to execute ONLY when the previous activity was a given one.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Add an intent parameter from your ‘previous’ activity. You can check for it’s existence in the new activity and act accordingly if it’s there.