I have this code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Button play= (Button) findViewById(R.id.play);
play.setVisibility(1);
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK
&& null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
ImageView imageView = (ImageView) findViewById(R.id.imgView);
imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));
}
}
public void Play(View view){
int[] mImageIds = {R.id.imgView};
Intent intent = new Intent(this, PuzzleSelectActivity.class);
intent.putExtra("images", mImageIds);
this.startActivity(intent);
}
i want to get the image id from the protected void onActivityResult and pass it on the mImageIds...