Skip to content

Commit

Permalink
Update ForegroundService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek-chaubey authored Feb 5, 2025
1 parent fa0a429 commit 93cccb6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,13 @@ public void onReceive(Context context, Intent intent) {
};

IntentFilter filter = new IntentFilter(ACTION_UPDATE_NOTIFICATION);
registerReceiver(updateReceiver, filter,RECEIVER_EXPORTED);

if (Build.VERSION.SDK_INT >= 34 && getApplicationInfo().targetSdkVersion >= 34) {
registerReceiver(updateReceiver, filter,RECEIVER_EXPORTED);
}
else{
registerReceiver(updateReceiver, filter);
}
}

@Override
Expand Down

0 comments on commit 93cccb6

Please sign in to comment.