We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf9e884 commit 2639523Copy full SHA for 2639523
android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
@@ -196,7 +196,11 @@ public void run() {
196
DownloadManager dm = (DownloadManager) appCtx.getSystemService(Context.DOWNLOAD_SERVICE);
197
downloadManagerId = dm.enqueue(req);
198
androidDownloadManagerTaskTable.put(taskId, Long.valueOf(downloadManagerId));
199
- appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
200
+ appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), Context.RECEIVER_EXPORTED);
201
+ } else {
202
+ appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
203
+ }
204
return;
205
}
206
0 commit comments