I have an android app that allows you to open an image on your phone using an intent to the Gallery. You make modifications to that image and the app saves it with a new na
use the MediaScannerConnection -
MediaScannerConnection.scanFile(context,
new String[] { imagePath }, null,
new MediaScannerConnection.OnScanCompletedListener() {
@Override
public void onScanCompleted(String path, Uri uri) {
//....
}
});
As best I can tell from digging through the Android Camera app source, in the ActivityBase.java class there is an inner class called "MyAppBridge" which has the following comment:
//////////////////////////////////////////////////////////////////////////
// The is the communication interface between the Camera Application and
// the Gallery PhotoPage.
//////////////////////////////////////////////////////////////////////////
Within that class there is a function as follows:
public void addSecureAlbumItem(boolean isVideo, int id) {
if (mServer != null) mServer.addSecureAlbumItem(isVideo, id);
}
Now the problem is trying to figure out where the Server
class comes from, since searching the rest of the project doesn't turn anything up and I can't find it in the imports of the ActivityBase
class.
I know this isn't a complete answer but it should hopefully point you in the right direction. When in doubt: Use the source, Luke.