Kamis, Maret 22, 2012

AIR Native Extension (ANE) to Refresh Gallery on Android

If we create an AIR application on Android device with one of its feature is to save picture to SD card, the picture was not immediately appear in the Gallery. Some people advise to unmount and then mount back the SD card so that Gallery updates information of the pictures contained on device. Obviously this way is impractical and not elegant if every time our application saves pictures, requires user to perform these steps manually.

For that reason I have created this simple native extension. It will force the Android device to refresh existing Gallery then displays a native notification (optional). Please observe RefreshGallery class to see what parameters can be used by refreshGallery method.
Extension ID: com.pusleb.RefreshGallery
Download the RefreshGallery.ane

Click here for a more detailed version of this article in Indonesian language.