I have an app that will try and restore a database from the SD card on the first start after and data clear or reinstall. I have the data back saved to the Downloads directory on the SD Card. This works perfect for Android 2.2 and higher, but I'm running into problems with 2.1.1 and below. below is the line of code that is through the error.
File sdPath = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) +
"/Android/data/com.company.appname/databases/");
The problem above is "Environment.DIRECTORY_DOWNLOADS". It said "DIRECTORY_DOWNLOADS cannot be resolved or is not a field" when i'm running it on Android 2.1.1 and lower.
Thanks in advance for any help!