Need to know the difference

Difference between Pending Intent for service and Broadcast

PendingIntent.getActivity() — This will start an Activity like calling context.startActivity() PendingIntent.getBroadcast() — This will perform a Broadcast like calling context.sendBroadcast() PendingIntent.getService() — This will start a Services like calling context.startService() PendingIntent.getForegroundService() — This will start a foregroundService like calling context.startForegroundService()

For reference

1 Like

Okay sir Thank you sir !!!

But what is the difference between Service & Foreground service