Skip to content

Instantly share code, notes, and snippets.

@codigoinerte
Created May 29, 2024 21:45
Show Gist options
  • Save codigoinerte/e51014f024c2e2ce46eba6d793d2a545 to your computer and use it in GitHub Desktop.
Save codigoinerte/e51014f024c2e2ce46eba6d793d2a545 to your computer and use it in GitHub Desktop.
Actualicación de RNFetchBlobReq para SDK 34 y capar mensaje error en consola al descargar
#path: b/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
replace : appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
to:
if (Build.VERSION.SDK_INT >= 34 && appCtx.getApplicationInfo().targetSdkVersion >= 34) {
appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), Context.RECEIVER_EXPORTED);
}else{
appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment