Android Build an Interactive Story App Intents and Multiple Activities Getting Data from an Intent

prosper nyamukondiwa
prosper nyamukondiwa
656 Points

setting fuelLevel to the value of the intent

whats the missing part on my code

FlightActivity.java
import android.os.Bundle;

public class FlightActivity extends AppCompatActivity {

    public int fuelLevel = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_flight);

       Intent intent=getIntent();
      String fuelLevel=intent.getStringExtra("FUEL_LEVEL");



        // Add your code below!

    }
}