示例#1
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the logging
    Log.init();

    // Log a message (only on dev platform)
    Log.i(this, "onCreate");

    setContentView(R.layout.main);
  }
  @Override
  public void prepareDatabase() throws RestServiceException {
    if (mContentIsEqual) {
      Log.i(TAG, "content is equal according to etag - doing nothing");
      return;
    }

    getResolver().delete(CategoriesContent.CONTENT_URI, null, null);
    DataOperationsCategories doc = new DataOperationsCategories(getResolver());
    doc.insert(getTempStore());
    clearTempStore();
  }
 @Override
 public void onReady() {
   super.onReady();
   addResultText.setText(String.valueOf(result));
   Log.i("Displayed result " + result + " to user");
 }