Communication between Service and Activity each hosted in different process using PendingIntent
问题 I am starting a foreground service from a fragment which gets destroyed after call to startService() , which is a reason I can't use ResultReceiver or Messanger . So the option remains PendingIntent . How can I communicate between foreground service(hosted in different process) from any activity/fragment using PendingIntent? 回答1: You have two separate issues: How do you get data from the service process to the UI process? How do you get the data from whatever you did for #1 to whatever