Thanks a lot ..just would like to add that for Android 10+ we cant do this directly we have to give request Legacy External Storage true in Manjfest file.Thanks✌️
You uploaded this video recently, so I was expecting use of SAF. Please don't promote deprecated things. Starting from Android 11, you can't use this anymore and in Android 10, requestLegacyExternalStorage was provided so that developers can get enough time to migrate to use SAF.
@@muhammadjawad1065 Just go for documentation of SAF. Examples have been provided for almost every possible case. You should also check Android dev summit 2019 videos. They have explained everything perfectly!
By the way if the deadline of your app delivery is near better lower your target sdk to 28 and later after becoming familiar to saf switch it back up to 29 or 30.
Hii.. I was trying to make directory of my app in external storage from some previous days.. And here i saw your tutorial but again in confusion because my IDE shows that .getExternalStorageDirectory is deprecated now. And a cross line appears upon this tag. Actually I want to implement that when user install and run my app, the App Name folder must be created automatically (after permission granted by user). But I am unable to do this. Can you please make a tutorial on this topic? Bcz you are using a EditText and String method and its not useful for me. THANKS IN ADVANCE 😊
@Tech Bro it is not changeable by Alt Enter because its accept this line but with Strikethrough text. And What is the code for automatically generate the folder with app name.
@Tech Bro its works after changing to "getExternalFilesDir()" instead of "Environment.getExternalStorageDirectory" ... and make a directory in Android > data > com.PackageName > My XYZ file. But I want to create a directory like WhatsApp, Telegram, Android etc. How??
@Tech Bro In this video its a very lengthy code to implement an external storage directory method. You can do it in just 3 easy lines as i implemented it myself. File file = new File (getExternalFilesDir("YourAppName") + "/subFolder" ; if (!=file.mkdirs()) { file.mkdirs(); } Put this code into OnCreate method.. And Run. When you open your app the Package name directory will generate automatically (No need such type of EditText or Strings)
Thanks a lot ..just would like to add that for Android 10+ we cant do this directly we have to give request Legacy External Storage true in Manjfest file.Thanks✌️
You uploaded this video recently, so I was expecting use of SAF. Please don't promote deprecated things. Starting from Android 11, you can't use this anymore and in Android 10, requestLegacyExternalStorage was provided so that developers can get enough time to migrate to use SAF.
can you suggest to us any tutorial or website link about this topic because its not working on android 10,11
@@muhammadjawad1065 Just go for documentation of SAF. Examples have been provided for almost every possible case.
You should also check Android dev summit 2019 videos. They have explained everything perfectly!
ua-cam.com/video/UnJ3amzJM94/v-deo.html
By the way if the deadline of your app delivery is near better lower your target sdk to 28 and later after becoming familiar to saf switch it back up to 29 or 30.
Bad luck. Now you have to target Android 10 or above if you want to release to play store!
Bro how to add images in folder?
This code won't work in API 29 and higher.
Yeah bro did you find any solution?
@@Djsore22 did you ?
@@Djsore22 android:requestLegacyExternalStorage="true" in Android Manifest block "application"
solution :
File folder = new File(MainActivity.this.getExternalCacheDir(),"folder name");
this worked for me...
try this
@@incodewetrust8862 try this way,
File folder = new File(MainActivity.this.getExternalCacheDir(),"folder name");
Great Work🔥 Bro.. keep it up...❤️❤️❤️❤️
Thanks bro
great video. Do you have a video on how to use this custom directory. For example take a photo and save in the custom directory?
Android 11 not supported how can I fix that problem with that version?
Please reply : getExternalStorageDirectory() is deprecated so how can i do it now ?
How to delete folder?
So without learning how to do this stuff I can't just record on my phone and have it save to my external SD Card?
Plz upload a tutorial on data store in MySQL database with refresh layout
Ok. I will try it later
Hii.. I was trying to make directory of my app in external storage from some previous days.. And here i saw your tutorial but again in confusion because my IDE shows that .getExternalStorageDirectory is deprecated now. And a cross line appears upon this tag.
Actually I want to implement that when user install and run my app, the App Name folder must be created automatically (after permission granted by user).
But I am unable to do this. Can you please make a tutorial on this topic? Bcz you are using a EditText and String method and its not useful for me. THANKS IN ADVANCE 😊
@Tech Bro it is not changeable by Alt Enter because its accept this line but with Strikethrough text. And What is the code for automatically generate the folder with app name.
@Tech Bro okay bro.. Let me implement it as it is.. I will reply if any problem accrue.
@Tech Bro its works after changing to "getExternalFilesDir()" instead of "Environment.getExternalStorageDirectory" ... and make a directory in Android > data > com.PackageName > My XYZ file.
But I want to create a directory like WhatsApp, Telegram, Android etc.
How??
@Tech Bro me too.. If u get any solution then plz comment or reply here 🙄
@Tech Bro In this video its a very lengthy code to implement an external storage directory method.
You can do it in just 3 easy lines as i implemented it myself.
File file = new File (getExternalFilesDir("YourAppName") + "/subFolder" ;
if (!=file.mkdirs()) {
file.mkdirs();
}
Put this code into OnCreate method.. And Run.
When you open your app the Package name directory will generate automatically (No need such type of EditText or Strings)
Really useful !! I subscribe!!
Thanks a lot.
You're welcome
Pls how to open permission for data collector of code in user's consent on Android studio
What to do if I want to store a pdf in that directory in Android studio??
Ther is not working for android 11 , how can fixed ?
I want create folder in SD card no phone storage
That doesnt work on Android 11
Bhai ek Fitness App ka tutorial bnao
I am not providing complete app development. But you can implement all those topics which i made. I think it will help you.
alertbox is showing failed to create folder mkdirs: false. I checked everything even the permission but still same alert
Test it on the physical device not the AVD. It works on my
@@moldainc9035 I have resolved this bug few months ago.Thanks for the help btw 😁
plz make pdf in android
Android Q deprecated
Deprecated in Android 10 and removed in Android 11.
deprecated