Пример #1
0
 @Override
 protected void onDestroy() {
   if (ConfigUtils.USE_AD_MOB && adView != null) {
     adView.destroy();
   }
   super.onDestroy();
   uiHelper.onDestroy();
 }
Пример #2
0
 @Override
 protected void onPause() {
   if (ConfigUtils.USE_AD_MOB && adView != null) {
     adView.pause();
   }
   super.onPause();
   uiHelper.onPause();
 }
Пример #3
0
  @Override
  protected void onResume() {
    super.onResume();
    if (ConfigUtils.USE_AD_MOB && adView != null) {
      adView.resume();
    }

    uiHelper.onResume();
  }
Пример #4
0
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    _init();

    uiHelper = new UiLifecycleHelper(this, statusCallback);
    uiHelper.onCreate(savedInstanceState);
  }
Пример #5
0
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    uiHelper.onActivityResult(
        requestCode,
        resultCode,
        data,
        new FacebookDialog.Callback() {
          @Override
          public void onError(
              FacebookDialog.PendingCall pendingCall, Exception error, Bundle data) {
            Log.e("Activity", String.format("Error: %s", error.toString()));
          }

          @Override
          public void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) {
            Log.i("Activity", "Success!");
          }
        });
  }
Пример #6
0
 @Override
 public void onStop() {
   super.onStop();
   EasyTracker.getInstance(this).activityStop(this); // Add this method.
 }
Пример #7
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   uiHelper.onSaveInstanceState(outState);
 }