File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
android/src/main/java/com/RNFetchBlob Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,11 @@ public void run() {
196196 DownloadManager dm = (DownloadManager ) appCtx .getSystemService (Context .DOWNLOAD_SERVICE );
197197 downloadManagerId = dm .enqueue (req );
198198 androidDownloadManagerTaskTable .put (taskId , Long .valueOf (downloadManagerId ));
199- appCtx .registerReceiver (this , new IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ));
199+ 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+ }
200204 return ;
201205 }
202206
You can’t perform that action at this time.
0 commit comments