Intimating an activity which calls a service when the service is complete
<p>Iam calling a service on a button click in an activity.This service syncs data with the server and saves the synced time. now i want to refresh my sync time in a text box in the activity after the service is over. similarly i want the button to be disabled if the service is already running and enable on complete of the service. how to achieve this. Iam new to android. please guide me on this
this is what i call in my onclick()</p>

<pre><code> WakefulIntentService.acquireStaticLock(context);
 context.startService(new Intent(context, HTSyncService.class));
</code></pre>

<p>my HTSyncService class extends WakefulIntentService</p>
