Passing values with intents
<p>I have searched and searched and I just can't get this code to work.I have a main.xml layout and a setting.xml.I have some values I would like the Settings.class to change in my main apps class.Three string to be exact.</p>

<p>I have tried this simple test code in my main app class</p>

<pre><code>settings.setOnClickListener(new OnClickListener(){

   @Override
   public void onClick(View v) {
    Intent intent = new Intent(v.getContext(), Settings.class);
     startActivityForResult(intent, 0);


   }
   });

//Then a function
 @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent intent){
      super.onActivityResult(requestCode, resultCode, intent);
      Bundle extras = intent.getExtras();
      String value = extras.getString("myKey");
      if(value!=null){
      Log.d("hmmm",value);
      }
  }
}
</code></pre>

<p>In my settings.class I have the following</p>

<pre><code> returnHome.setOnClickListener(new OnClickListener(){

    @Override
    public void onClick(View v) {
     Intent intent = new Intent();
     intent.putExtra("myKey", "YEAH"); 
                 setResult(RESULT_OK, intent);
                 finish();


    }

         });
</code></pre>

<p>Back in main app class it is not getting logged.</p>

<p>Like I said I have three string in the main class that I want settings class to change and send back.
Any help is greatly appreciated</p>
