0

I am using below function to create album and save images in gallery, Album creates successfully and image also gets saved.

But the album is created under other albums as shown in the images. How to bring the album to the main list like Facebook and Whatsapp Albums programatically ?

void sevImjToGlrFnc(String fileNamVar)
{
    File rutGlrFdrVar = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),"NamApp");

    String sevPathVar = RutGlrFdrVar.getPath() + "/" + fileNamVar + ".jpg";

    ContentValues sevValues = new ContentValues();
    sevValues.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());
    sevValues.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
    sevValues.put(MediaStore.MediaColumns.DATA, sevPathVar);

    getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, sevValues);
}

Main Album List Other Album List

Sujay U N
  • 4,974
  • 11
  • 52
  • 88
  • Sorry I dint get u. This is not iOS and its android. This is default Galery App album list. – Sujay U N Aug 10 '17 at 00:36
  • is the album sorted by date created? you can try deleting the WhatsApp folder and reopening WhatsApp, to see if it is pushed to the end of the list. – Angel Koh Aug 10 '17 at 00:40
  • This is Vivo Mobile Default Gallary App and they have done everything like iOS – Sujay U N Aug 11 '17 at 21:54

0 Answers0