title: How to reference the edited image to share it on social media?
body: <p>I want to share the edited photo to a social media site after editing it using PhotoEditorSDK Android version, so I created a <code>shareImage()</code> function.</p>
  
  <p>However I am not sure how to reference the edited image from the PhotoEditorSDK in the share function. Currently the code listed below I just add a dummy image of the image taken from drawable resources.</p>
  
  <p>Also currently the share button I placed in PhotoEditorSDK photoeditor view keeps crashing on press. </p>
  
  <pre><code>public class PhotoEditorActivity extends Activity implements PermissionRequest.Response {
      private static final String FOLDER = "ArtCam";
      public static int CAMERA_PREVIEW_RESULT = 1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          SettingsList settingsList = new SettingsList();
          settingsList.getSettingsModel(EditorLoadSettings.class)
              .setImageSourcePath(selectedImagePath, true) // Load with delete protection true!
              .getSettingsModel(EditorSaveSettings.class)
              .setExportDir(Directory.DCIM, FOLDER)
              .setExportPrefix("result_")
              .setSavePolicy(
                  EditorSaveSettings.SavePolicy.KEEP_SOURCE_AND_CREATE_ALWAYS_OUTPUT
              );
  
          new PhotoEditorBuilder(this)
              .setSettingsList(settingsList)
              .startActivityForResult(this, CAMERA_PREVIEW_RESULT);
  
          shareImage();
      }
  
      private void shareImage() {
          Intent shareIntent;
          Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
          String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/Share.png";
          OutputStream out = null;
          File file = new File(path);
          try {
              out = new FileOutputStream(file);
              bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
              out.flush();
              out.close();
          } catch (Exception e) {
              e.printStackTrace();
          }
  
          path = file.getPath();
          Uri bmpUri = Uri.parse("file://" + path);
          shareIntent = new Intent(android.content.Intent.ACTION_SEND);
          shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          shareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
          shareIntent.putExtra(Intent.EXTRA_TEXT, "#" + getPackageName());
          shareIntent.setType("image/png");
          startActivity(Intent.createChooser(shareIntent, "Share with"));
      }
  </code></pre>