Android: restart remote service and bind it again -


i have remote service in android. it's binded list activity , sends messages it. service contins scheduled task in it. have preference: refresh interval service. want restart service when user changes refresh interval. butif in onsharedpreferencechanged() loose connection list activity. how can solve it? thanks.

i know can use broadcast reciever. there way?

i have remote service in android.

why? why not local service?

the service contins scheduled task in it.

why? why not use alarmmanager, service isn't sitting around in ram, watching time pass?

all want restart service when user changes refresh interval.

why? why not change alarmmanager schedule? if use local service, service can use sharedpreferences , setonsharedpreferencechangelistener() automatically notified of changes in refresh interval.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -