Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5840137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:41:47+00:00 2026-05-22T11:41:47+00:00

This is what I have: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import

  • 0

This is what I have:

    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.ArrayAdapter;
    import android.widget.EditText;
    import android.widget.Spinner;

    public class FireScreen extends Activity implements OnClickListener {



@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.firescreen);


    EditText FIinvolvedtext = (EditText) findViewById(R.id.FIinvolvedtext);
     String fireinvolvedsave = FIinvolvedtext.getText().toString();

        View FIUnitsStart = findViewById(R.id.FIUnitsStart);
        FIUnitsStart.setOnClickListener(this);
        View FIMainResume = findViewById(R.id.FIMainResume);
        FIMainResume.setOnClickListener(this);

        Spinner fire_type_spin = (Spinner) findViewById(R.id.FItypespin);
        ArrayAdapter<CharSequence> 
        adapter = ArrayAdapter.createFromResource(this, R.array.typespin_array, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        fire_type_spin.setAdapter(adapter);

        Spinner fire_type_array = (Spinner) findViewById(R.id.FIareaspin);
        ArrayAdapter<CharSequence> 
        adapter1 = ArrayAdapter.createFromResource(this, R.array.areaspin_array, android.R.layout.simple_spinner_item);
        adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        fire_type_array.setAdapter(adapter1);

        Spinner action_type_spin = (Spinner) findViewById(R.id.FIactionspin);
        ArrayAdapter<CharSequence> 
        adapter11 = ArrayAdapter.createFromResource(this, R.array.actionspin_array, android.R.layout.simple_spinner_item);
        adapter11.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        action_type_spin.setAdapter(adapter11);}


        public void onClick(View v) {

            switch(v.getId()){
            case R.id.FIUnitsStart:
                Intent UnitScreen = new Intent(this, UnitScreen.class);
                UnitScreen.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
                startActivity(UnitScreen);
            break;

            case R.id.FIMainResume:
                Intent Main = new Intent(this, Main.class);
                Main.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
                startActivity(Main);
            break;

            Intent pass = new Intent(getApplicationContext(), Main.class);   
            String keyIdentifer  = null;
            pass.putExtra("Involved", fireinvolvedsave);
    // Getting an error here: fireinvolvedsave cannot be resolved to a variable
            startActivity(pass);}}}

help — I have 7 activities of data I need to pass back to the main activity so I can place them into an email — kinda stuck right here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:41:48+00:00Added an answer on May 22, 2026 at 11:41 am

    fireinvolvedsave can’t be seen because you declared it as a local variable a different method to the one you are reading it in; you need to declare it as a field of the activity using, eg, public String etc, after public class FireScreen ... {


    public class FireScreen extends Activity implements OnClickListener
    {
      private String fireinvolvedsave;
    
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.firescreen);
    
        EditText FIinvolvedtext = (EditText) findViewById(R.id.FIinvolvedtext);
        fireinvolvedsave = FIinvolvedtext.getText().toString();
    
        // rest of original code for onCreate goes here
      }
    
    
      public void onClick(View v)
      {
        // original code etc
    
        Intent pass = new Intent(getApplicationContext(), Main.class);   
    
        // this now has a value:
        pass.putExtra("Involved", fireinvolvedsave);
        startActivity(pass);
      }
    }
    

    Try something like

    Intent myIntent = getIntent();
    String strText = myIntent.getStringExtra("Involved");
    

    and then

    emailIntent.putExtra(EXTRA_TEXT, strText);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to clear the surfaceView in android? I have a class like this -
Has anyone done this / have some example code?
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have
I have this code in jQuery, that I want to reimplement with the prototype
I have this idea for a free backup application. The largest problem I need
I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM
I have this line in a javascript block in a page: res = foo('<%=
I have this setup where in my development copy I can commit changes on
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
I have this RewriteRule that works too well :-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.