When I get UserRecoverableAuthIOException
in AbstractThreadedSyncAdapter
, I'm creating a notification as below.
Here's how I'm creating the service:
@Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub Log.i("Service", "Thread started"); return this.getSyncAdapter().getSyncAdapterBinder(); }
private GoogleTasksSyncAdapter getSyncAdapter() {
if (syncAdapter == null)
{
Log.i("Service", "syncAdapter started");
syncAdapter = new MySyncAdapter(this);
}
return syncAdapter;
}
Once the thread is started, I'm raising a notification. But once user clicks on the notification, they can see the authorization activity. After authorising how to resume from the last point. I.e how to get notified once the activity is closed in Syncadapter.