title: raw resource from an Activity to an other Activity to be played with SoundPool
body: <p>This is my project:</p>
  
  <p>Activity 1</p>
  
  <pre><code>    int ThePlayedSound= R.raw.Sound_ID;
  
      Intent MyIntent= new Intent(this, Main2Activity.class);
             MyIntent.putExtra("key",ThePlayedSound);
      startActivity(MyIntent);
  </code></pre>
  
  <p>Activity 2</p>
  
  <p>I want to play the raw source with a Sound Pool With a clicking button so:</p>
  
  <pre><code>    Intent MyIntent=getIntent();
      int ThePlayedSound= MyIntent.getIntExtra("key", 0);
  
      Sound_Pool_thing= new SoundPool(1, AudioManager.STREAM_MUSIC,0);
      Click = Sound_Pool_thing.load(this,ThePlayedSound , 1);
  
      button=(Button)findViewById(R.id.button);
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Sound_Pool_thing.play(Click,1,1,1,0,1);
  
          }
      });
  </code></pre>
  
  <p><strong>Edited : 
  and when i try to open the app I got Unfortunately , My_App has stopped</strong></p>
  
  <p>I can't figure it out ..Help =)</p>
  
  <p><strong>Editing adding the complete code for the second Activity</strong></p>
  
  <pre><code>public class Main2Activity extends AppCompatActivity {
      Button button;
      SoundPool Sound_Pool_thing;
      int Click;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity2_main);
  
          Intent MyIntent=getIntent();
          int ThePlayedSound= MyIntent.getIntExtra("key", 0);
  
          Sound_Pool_thing= new SoundPool(1, AudioManager.STREAM_MUSIC,0);
  
          Click = Sound_Pool_thing.load(this,ThePlayedSound , 1);
  
          button=(Button)findViewById(R.id.button);
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Sound_Pool_thing.play(Click,1,1,1,0,1);
  
              }
          });
  
      }
  }
  </code></pre>