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() {
196
196
DownloadManager dm = (DownloadManager ) appCtx .getSystemService (Context .DOWNLOAD_SERVICE );
197
197
downloadManagerId = dm .enqueue (req );
198
198
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 ), RECEIVER_NOT_EXPORTED );
201
+ } else {
202
+ appCtx .registerReceiver (this , new IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ));
203
+ }
200
204
return ;
201
205
}
202
206
You can’t perform that action at this time.
0 commit comments