java - Pass value to a Service, intentService or bindService? -


i need pass 3 float numbers service , @ end service need send me 'true' or 'false' boolean value.

i read 2 not know need use, example appreciated.

for first question : passing para intent service

using putextra pass values intent service

, , send notification activity intent service :

using resultreceiver in android

or try use callbacks interface in service , implement 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 :)


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -