Do I need to use two separate DownloadManager.Request one for API 9 and another for API 11?
No, but you do need to use a Java guard block:
DownloadManager.Request request = new DownloadManager.Request(uri)
.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE)
.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI)
.setAllowedOverRoaming(true)
.setDestinationInExternalFilesDir(this, null,String.valueOf(mPathAndFolder))
.setVisibleInDownloadsUi(false);
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB) {
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
}
And, you will have to settle for the fact that your download will be visible for API Level 9 and 10 devices.