File tree 2 files changed +10
-3
lines changed
java/com/valleydevfest/androidify
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,14 @@ private void share() {
176
176
requireActivity ().getContentResolver (), bitmap ,
177
177
getResources ().getString (R .string .android_avatar ), null
178
178
);
179
- Uri imageURI = Uri .parse (imagePath );
180
- startShareActivity (imageURI );
179
+ if (imagePath == null ) {
180
+ Toast .makeText (getActivity (),
181
+ getResources ().getString (R .string .could_not_save ),
182
+ Toast .LENGTH_SHORT ).show ();
183
+ } else {
184
+ Uri imageURI = Uri .parse (imagePath );
185
+ startShareActivity (imageURI );
186
+ }
181
187
}
182
188
183
189
private void startShareActivity (Uri imageURI ) {
Original file line number Diff line number Diff line change 9
9
<string name =" figure_saved" >Figure Saved!</string >
10
10
<string name =" submit" >Submit to website</string >
11
11
<string name =" back_to_website" >Visit website</string >
12
- <string name =" no_browser" >Could not open browser</string >
12
+ <string name =" no_browser" >So sorry, could not open browser</string >
13
13
<string name =" share" >Save / Share</string >
14
+ <string name =" could_not_save" >So sorry, could not save image</string >
14
15
<string name =" android_avatar" >Android Avatar</string >
15
16
16
17
</resources >
You can’t perform that action at this time.
0 commit comments