Skip to content

Commit af8c37f

Browse files
committed
working version
1 parent ef84b2d commit af8c37f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/katcom/androidFileVault/ImageViewerFragment.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ private void export() {
9696
intent.putExtra(Intent.EXTRA_TITLE, mFile.getFilename());
9797
startActivityForResult(intent, WRITE_REQUEST_CODE);
9898
}
99-
99+
private void share() {
100+
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
101+
intent.addCategory(Intent.CATEGORY_OPENABLE);
102+
intent.setType("image/*");
103+
intent.putExtra(Intent.EXTRA_TITLE, mFile.getFilename());
104+
startActivityForResult(intent, WRITE_REQUEST_CODE);
105+
}
100106
@Override
101107
public void onActivityResult(int requestCode, int resultCode, Intent data) {
102108
if (requestCode == WRITE_REQUEST_CODE && resultCode == Activity.RESULT_OK) {

0 commit comments

Comments
 (0)