private static void ActivateApp(String appId) {
    if (!activateAppCalled.compareAndSet(false, true)) {
      Log.w(TAG, "Activite app only needs to be called once");
      return;
    }
    final Activity unityActivity = getUnityActivity();
    if (appId != null) {
      AppEventsLogger.activateApp(unityActivity.getApplication(), appId);
    } else {
      AppEventsLogger.activateApp(unityActivity.getApplication());
    }

    // We already have a running activity so we need to call create activity to ensure the
    // logging is correct
    new Handler(Looper.getMainLooper())
        .post(
            new Runnable() {
              @Override
              public void run() {
                // These calls should be run on the ui thread.
                ActivityLifecycleTracker.onActivityCreated(unityActivity);
                ActivityLifecycleTracker.onActivityResumed(unityActivity);
              }
            });
  }
  @Override
  protected void onResume() {
    super.onResume();

    // Logs 'install' and 'app activate' App Events.
    AppEventsLogger.activateApp(this);
  }
 @Override
 protected void onResume() {
   super.onResume();
   Profile profile = Profile.getCurrentProfile();
   displayWelcomeMessage(profile);
   AppEventsLogger.activateApp(this);
 }
 @Override
 public void onResume(boolean multitasking) {
   super.onResume(multitasking);
   // Developers can observe how frequently users activate their app by logging an app activation
   // event.
   AppEventsLogger.activateApp(cordova.getActivity());
 }
Exemple #5
0
  @Override
  protected void onResume() {
    super.onResume();
    // Get source of open for app re-engagement
    mobileAppTracker.setReferralSources(this);
    // MAT will not function unless the measureSession call is included
    mobileAppTracker.measureSession();

    String facebookId = ManifestMetadataUtils.getString(this, "com.facebook.sdk.ApplicationId");
    AppEventsLogger.activateApp(this, facebookId);
    Log.xd(this, facebookId);
  }
 @Override
 protected void onResume() {
   super.onResume();
   AppEventsLogger.activateApp(this);
 }