commit 88d9ff62978623856da5237cbfaf8cd38ef55c7a
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Wed Jun 15 16:56:01 2016 +0100

    Save the image to 'Pictures' album in the Gallery.

diff --git a/src/main/java/org/distorted/examples/save/SaveWorkerThread.java b/src/main/java/org/distorted/examples/save/SaveWorkerThread.java
index d95f568..5475e4d 100644
--- a/src/main/java/org/distorted/examples/save/SaveWorkerThread.java
+++ b/src/main/java/org/distorted/examples/save/SaveWorkerThread.java
@@ -20,10 +20,13 @@
 package org.distorted.examples.save;
 
 import android.app.Activity;
+import android.content.Intent;
 import android.graphics.Bitmap;
+import android.net.Uri;
 import android.widget.Toast;
 
 import java.io.BufferedOutputStream;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.lang.ref.WeakReference;
@@ -189,5 +192,11 @@ public class SaveWorkerThread extends Thread
         catch(IOException io) {}
         }
       }
+
+    Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+    File f = new File(filename);
+    Uri contentUri = Uri.fromFile(f);
+    mediaScanIntent.setData(contentUri);
+    act.sendBroadcast(mediaScanIntent);
     }
   }
