|
|
@@ -1,6 +1,8 @@
|
1
|
1
|
package ai.pai.client.activity;
|
2
|
2
|
|
3
|
3
|
import android.content.Context;
|
|
4
|
+import android.content.Intent;
|
|
5
|
+import android.net.Uri;
|
4
|
6
|
import android.os.AsyncTask;
|
5
|
7
|
import android.os.Bundle;
|
6
|
8
|
import android.os.Environment;
|
|
|
@@ -171,6 +173,10 @@ public class PhotoFullScreenActivity extends BaseActivity implements View.OnClic
|
171
|
173
|
Toast.makeText(context, R.string.save_photo_success, Toast.LENGTH_SHORT).show();
|
172
|
174
|
try {
|
173
|
175
|
MediaStore.Images.Media.insertImage(context.getContentResolver(), file.getPath(), name, name);
|
|
176
|
+ Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
|
|
177
|
+ Uri uri = Uri.fromFile(file);
|
|
178
|
+ intent.setData(uri);
|
|
179
|
+ context.sendBroadcast(intent);
|
174
|
180
|
} catch (Exception e) {
|
175
|
181
|
e.printStackTrace();
|
176
|
182
|
}
|