I have activityA
where I show list of options. Based on the option chosen(Say gender : male), a request is passed on to a Service.
case R.id.male:
// do operations specific to this selection
Intent explicitGetNameServiceIntent = new Intent(getActivity(), GetNameService.class);
getActivity().startService(explicitGetNameServiceIntent);
The purpose of service is to get data from web services and return the list of items(say 10 male names) to fragmentB
of activityB
(where a new list is populated with received 10 names from web services).
Since the data from web services is got within the onHandleIntent()
method (which is a void method) of GetNameService
, how can I send the received data from web services to fragmentB