1. robertanisoiu's Avatar
    I have an application that make photos into a subdirectory called "DesPictures" in Environment.DIRECTORY_DCIM public directory

    Another application scan the "DesPictures" directory and delete the photos one by one.

    In Android 10 the code is:
    dir = new File (Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + "/DesPictures");
    File list[] = dir.listFiles();
    if (list != null) {
    for (int i = 0; i < list.length; i++) {
    list[i].delete(); //WORKS IN Android 10 but DOES NOT WORK IN Android 11

    Can anybody help me, please, in order to delete each list[i] in Android 11? Thank you
    08-01-2021 11:33 PM

Similar Threads

  1. My Android phone was hacked, how can I restore my phone?
    By Vegas no_0 in forum Ask a Question
    Replies: 7
    Last Post: 09-08-2021, 12:11 AM
  2. Samsung Notes Compatible with Pixel?
    By TheAngryToaster in forum Google Pixel 5
    Replies: 3
    Last Post: 08-02-2021, 04:49 PM
  3. [Free][HTML5] 500+ MiniGame In one android game app
    By andywww in forum Android Games
    Replies: 0
    Last Post: 08-01-2021, 07:25 PM
  4. Whats the symbol in pic
    By Android Central Question in forum Ask a Question
    Replies: 3
    Last Post: 08-01-2021, 07:07 PM
  5. Android Note 20 ultra 5G having sound volume issues
    By MaidUp13 in forum Ask a Question
    Replies: 2
    Last Post: 08-01-2021, 01:16 PM