title: Android - Cannot resolve method 'onActivityResult(int, int, android.content.Intent)
body: <p>I need to set/add a photo/movie as an attachment to ToDo App.
  Unfortunately the word: onActivityResult in line super.onActivityResult(requestCode, resultCode, data); is highlighted in red and i'm getting an error:</p>
  
  <p>"Cannot resolve method 'onActivityResult(int, int, android.content.Intent)' "</p>
  
  <p>AddActivity.java</p>
  
  <pre><code>    Button button_z = (Button) findViewById(R.id.button_z);
          button_z.setonclickListener(new View.onclickListener() {
                  @Override
                  public void onclick(View view2) {
  
                      selectImage();
   }
             @Override 
      protected void onActivityResult(int requestCode, int resultCode, Intent  data) {
                      super.onActivityResult(requestCode, resultCode, data);
                      if (resultCode == RESULT_OK) {
                          if (requestCode == REQUEST_CAMERA) {
  
                    Bitmap thumbnail = (Bitmap) data.getExtras().get("data");
                             90, bytes);
                              ByteArrayOutputStream bytes = new ByteArrayOutputStream();
                              thumbnail.compress(Bitmap.CompressFormat.JPEG, 90, bytes);
                              File destination = new File(Environment.getExternalStorageDirectory(),
                                      System.currentTimeMillis() + ".jpg");
                              FileOutputStream fo;
                              try {
                                  destination.createNewFile();
                                  fo = new FileOutputStream(destination);
                                  fo.write(bytes.toByteArray());
                                  fo.close();
                              } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                              } catch (IOException e) {
                                  e.printStackTrace();
                              }
                              imageView.setImageBitmap(thumbnail);
                          } else if (requestCode == SELECT_FILE) {
  
                              Uri selectedImageUri = data.getData();
                              String[] projection = {MediaStore.MediaColumns.DATA};
                              CursorLoader cursorLoader = new CursorLoader(AddActivity.this, selectedImageUri, projection, null, null, null);
                              Cursor cursor = cursorLoader.loadInBackground();
                              int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
                              cursor.moveToFirst();
                              String selectedImagePath = cursor.getString(column_index);
                              Bitmap bm;
                              BitmapFactory.Options options = new BitmapFactory.Options();
                              options.inJustDecodeBounds = true;
                              BitmapFactory.decodeFile(selectedImagePath, options);
                              final int REQUIRED_SIZE = 200;
                              int scale = 1;
  
                              while (options.outWidth / scale / 2 &gt;= REQUIRED_SIZE
                                      &amp;&amp; options.outHeight / scale / 2 &gt;= REQUIRED_SIZE)
                                  scale *= 2;
                              options.inSampleSize = scale;
                              options.inJustDecodeBounds = false;
                              bm = BitmapFactory.decodeFile(selectedImagePath, options);
                              imageView.setImageBitmap(bm);
                          }
                      }
  
          private void selectImage() {
              final CharSequence[] items = { "Zrób zdjęcie lub nagranie", "Wybierz istniejące", "Anuluj" };
  
              AlertDialog.Builder builder = new AlertDialog.Builder(AddActivity.this);
              builder.setTitle("Dodaj załącznik");
              builder.setItems(items, new DialogInterface.onclickListener() {
                  @Override
                  public void onclick(DialogInterface dialog, int item) {
                      if (items[item].equals("Zrób zdjęcie lub nagranie")) {
                          Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                          startActivityForResult(intent, REQUEST_CAMERA);
                      } else if (items[item].equals("Wybierz istniejące")) {
                          Intent intent = new Intent(
                                  Intent.ACTION_PICK,
                                  android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
                          intent.setType("image/*");
                          startActivityForResult(
                                  Intent.createChooser(intent, "Wybierz plik"),
                                  SELECT_FILE);
                      } else if (items[item].equals("Anuluj")) {
                          dialog.dismiss();
                      }
                  }
              });
              builder.show();
          }
                  }
  </code></pre>