Android KitKat MediaScannerConnection not finding images saved to private app folder -


The

I have created an app which contains processed chosen went image by the user from the gallery, to process the modified image The new kitkat permissions limitations on the specific devices (mainly Samsung) are seriously restricting with a modified file name in the folder of the original image after which a non-system app, eg. Return to external SD card or typical gallery locations. Documentation obtained through private package specific folder

  getExternalFilesDir (zero) to recommend to write   

This is fine and image correctly but then the saved

  MediaScannerConnection.scanFile   Even a reboot 

, as correctly to the central media database updates The revised image does not appear in the gallery after the call fails to scan the full scan of all media devices To Radrshit image should not be triggered.

Does not the following code in other words:

  file Apeediaiar = Mataktivtikis .getExternalFilesDir (empty); File file = new file (app, "new_image.jpeg"); // process the image file and write off ... MediaScannerConnection.scanFile (this, new String [] {file.getAbsolutePath ()}, null, New MediaScannerConnection.OnScanCompletedListener () {@Override public void onScanCompleted (string path, Uri uri) {Log.i (LOG_TAG, string format ("scanned file:% s", path));}});   

OnScanCompleted method does not fire the gallery but the new image is displayed.

Anyone seen this behavior, MediaScanner does not scan 'Personal' application folder and if so how can I get the gallery and display a new image.

If you want images taken by the gallery, you should place them in the appropriate public place You can get the proper place using.

Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

Matlab transpose a table vector -

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -