나는 스크린 샷을 찍은 앱을 공유 의도와 공유합니다. 사용자가 단순히 이미지를 공유하기를 원할 때마다 여러 개의 이미지를 저장하는 것이 아닙니다. 아래는 내가 단순히 같은 비트 맵을 저장하는 방법을 알아낼 질수 그러나 SDAndroid : 공유 비트 맵을 SD에 저장하지 않았습니다.
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/png");
dir = "file://" + Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Folder/" + location;
share.putExtra(Intent.EXTRA_STREAM, Uri.parse(dir));
startActivity(Intent.createChooser(share, "Share Image"));
에 저장된 이미지에 사용되는 코드 ...
share.putExtra(Intent.EXTRA_STREAM, theBitmap);
은하지 않고 할 수있는 방법이 있나요이다 이미지 저장?
감사합니다.
이것은 내가 한 일이기도하지만 SD 카드를 사용할 필요가 없으며 외부 저장소 읽기/쓰기 권한을 요청할 필요가 없습니다. 내부 저장소로이를 수행하는 방법이있는 것 같습니다. – Suragch
이 Q & A는 읽을만한 가치가 있습니다. http://stackoverflow.com/questions/9049143/android-share-intent-for-a-bitmap-is-it-possible-not-to-save-it-prior-sharing – Suragch