I need to pass 3 float numbers to a service and at the end the service need to send me back 'true' or 'false' boolean value.
I read about the two but do not know what I need to use, an example will be appreciated.
I need to pass 3 float numbers to a service and at the end the service need to send me back 'true' or 'false' boolean value.
I read about the two but do not know what I need to use, an example will be appreciated.
For your first Question : Passing para to intent service
Using putExtra to pass values to intent service
, and about send notification back to activity from intent service :
Using ResultReceiver in Android
or try to use Callbacks Interface in service and implement it on activity
// on intent service
private onGetNotification notify=(onGetNotification)contextOfActivity;
public interface onGetNotification {
public setOnGetNotification(Boolean result);
}
// use when finish
public void endOfService(){
notify.setOnGetNotification(true);
}
Hope That Help :)