Please let me know what are default locations for Downloads folder on devices with and without SD card.
And how can I check if particular phone doesn’t have SD card.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To check and see if a device has an SD card, you use:
Environment.getExternalStorageState()if you don’t have an SD card, you use:Environment.getDataDirectory()Essentially, if there is no SD card, you can create your own directory on the device locally. I’ve listed some code that might help:
Hope this helps.