protected void sendDataToReceiver(ResultReceiver receiver,Intent originalIntent,Serializable data){
  if (receiver != null && data != null) {
    Bundle bundle=new Bundle();
    bundle.putParcelable(ServiceReceiver.EXTRA_ORIGINAL_INTENT,originalIntent);
    bundle.putSerializable(ServiceReceiver.EXTRA_DATA,data);
    receiver.send(ServiceReceiver.STATUS_DATA,bundle);
  }
}

protected void sendDataToReceiver ( ResultReceiver receiver , Intent originalIntent , Serializable data ) { if ( receiver != null && data != null ) { Bundle bundle = new Bundle ( ) ; bundle . putParcelable ( ServiceReceiver . EXTRA_ORIGINAL_INTENT , originalIntent ) ; bundle . putSerializable ( ServiceReceiver . EXTRA_DATA , data ) ; receiver . send ( ServiceReceiver . STATUS_DATA , bundle ) ; } }
sends data to the receiver , usually the creator of the service intent .
