This is how I am currently doing it but, it just force closes app.
In the first activity
Intent myIntent = new Intent(Input.this, results.class);
myIntent.putExtra("perfect", rig);
startActivity(myIntent);`
Activity I want to transfer to
Boolean lovers = getIntent().getExtras().getBoolean("perfect");
As the docs say, the function is getBooleanExtra
Boolean lovers = getIntent().getExtras().getBooleanExtra("perfect");
I am not sure about the accepted answer:: But i think it should be
Boolean lovers = getIntent().getExtras().getBoolean("perfect");
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