Reading chapter Services And Command Pattern:
In one section of communication between activity and service you mentioned-
Your activity can call createPendingResult(). This returns a PendingIntent. In this case, the PendingIntent will cause a result to be delivered to your activity’s implementation of onActivityResult(), just as if another activity had been called with startActivityForResult() and, in turn, called setResult() to send back a result.
I just can’t get how to do that, can you explain this little more?
This Works fine on Activity but when using on Fragment its not working properly.