Compare values between Activities

0

] 2

I want to compare a value of an activity with another value of another activity, the value I want to compare is the result.getContent () that is from a QR reader

If someone would be so kind to help me, I would really appreciate it:)

    
asked by German Silva 18.10.2018 в 02:10
source

1 answer

0

What you want to do is pass information through activities, here is an example:

Do an Intent where you save the data you need (in this case we use a String)

Intent intent = new Intent(getBaseContext(), tuActividad.class);
intent.putExtra("EXTRA_SESSION_ID", sessionId);
startActivity(intent);

You can access this from the other activity:

String sessionId= getIntent().getStringExtra("EXTRA_SESSION_ID");

I hope it serves you!

    
answered by 19.10.2018 / 12:17
source