This repository was archived by the owner on Jul 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
send-to-desktop-api/app/src/main
java/com/adobe/sendtodesktopapi Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2
2
<manifest xmlns : android =" http://schemas.android.com/apk/res/android"
3
3
package =" com.adobe.sendtodesktopapi" >
4
4
5
+ <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" />
6
+
5
7
<application
6
8
android : allowBackup =" true"
7
9
android : icon =" @mipmap/ic_launcher"
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public void onClick(View v) {
91
91
galleryPickerIntent .setType ("image/*" );
92
92
galleryPickerIntent .setAction (Intent .ACTION_GET_CONTENT );
93
93
94
- startActivityForResult (Intent .createChooser (galleryPickerIntent , "Select an Image" ), 203 );
94
+ startActivityForResult (Intent .createChooser (galleryPickerIntent , "Select an Image" ), 203 ); // Can be any int
95
95
}
96
96
};
97
97
mOpenGalleryButton .setOnClickListener (mOpenGalleryButtonListener );
@@ -132,6 +132,13 @@ protected void onDestroy() {
132
132
public void onActivityResult (int requestCode , int resultCode , Intent data ) {
133
133
super .onActivityResult (requestCode , resultCode , data );
134
134
mAuthSessionHelper .onActivityResult (requestCode , resultCode , data );
135
+
136
+ if (resultCode == RESULT_OK && requestCode == 203 ) { // the int we used for startActivityForResult()
137
+
138
+ mSelectedImageUri = data .getData ();
139
+ mSelectedImageView .setImageURI (mSelectedImageUri );
140
+
141
+ }
135
142
}
136
143
137
144
@ Override
You can’t perform that action at this time.
0 commit comments