Android Build an Interactive Story App Intents and Multiple Activities Putting Data in an Intent

Caleb Seeling
Caleb Seeling
1,189 Points

Can't understand and solve the question

Please help me understand and solve this coding challenge.
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class LaunchActivity extends AppCompatActivity {

    public Button launchButton;
    public int fuelLevel;

    protected void onCreate(Bundle savedInstanceState) {

        // fuelLevel is set elsewhere.
        // Code ommitted for brevity!

        launchButton = (Button)findViewById(;
        launchButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Add your code in here!
                Intent intent = new Intent(LaunchActivity.this, FlightActivity.class);

1 Answer