Environment.getExternalStorageDirectory() deprecated in API level 29 java

前端 未结 6 1061
梦毁少年i
梦毁少年i 2020-11-22 13:08

Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that

Environment.getExternalStorageDirectory() i

6条回答
  •  无人共我
    2020-11-22 13:43

    Get the destPath with the new API call:

    String destPath = mContext.getExternalFilesDir(null).getAbsolutePath();
    

提交回复
热议问题