Android Open Source - RecipeBook Sync Service






From Project

Back to project page RecipeBook.

License

The source code is released under:

Copyright (c) 2013, Ian Lake All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Red...

If you think the Android project RecipeBook listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ianhanniballake.recipebook.sync;
//from  w w w .j av  a2  s  . c o  m
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

/**
 * Service to handle sync with Drive. It instantiates the SyncAdapter and returns its IBinder.
 */
public class SyncService extends Service
{
  private static SyncAdapter sSyncAdapter = null;
  private static final Object sSyncAdapterLock = new Object();

  @Override
  public IBinder onBind(final Intent intent)
  {
    return sSyncAdapter.getSyncAdapterBinder();
  }

  @Override
  public void onCreate()
  {
    synchronized (sSyncAdapterLock)
    {
      if (sSyncAdapter == null)
        sSyncAdapter = new SyncAdapter(getApplicationContext(), true);
    }
  }
}




Java Source Code List

com.ianhanniballake.recipebook.auth.AuthorizedActivity.java
com.ianhanniballake.recipebook.auth.SyncDriveAsyncTask.java
com.ianhanniballake.recipebook.model.Ingredient.java
com.ianhanniballake.recipebook.model.Instruction.java
com.ianhanniballake.recipebook.model.Recipe.java
com.ianhanniballake.recipebook.provider.RecipeContract.java
com.ianhanniballake.recipebook.provider.RecipeProvider.java
com.ianhanniballake.recipebook.sync.SyncAdapter.java
com.ianhanniballake.recipebook.sync.SyncService.java
com.ianhanniballake.recipebook.ui.RecipeDetailActivity.java
com.ianhanniballake.recipebook.ui.RecipeDetailIngredientFragment.java
com.ianhanniballake.recipebook.ui.RecipeDetailInstructionFragment.java
com.ianhanniballake.recipebook.ui.RecipeDetailSummaryFragment.java
com.ianhanniballake.recipebook.ui.RecipeEditActivity.java
com.ianhanniballake.recipebook.ui.RecipeListActivity.java