當前位置: 首頁>>代碼示例>>Java>>正文


Java AppEventsLogger類代碼示例

本文整理匯總了Java中com.facebook.appevents.AppEventsLogger的典型用法代碼示例。如果您正苦於以下問題:Java AppEventsLogger類的具體用法?Java AppEventsLogger怎麽用?Java AppEventsLogger使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AppEventsLogger類屬於com.facebook.appevents包,在下文中一共展示了AppEventsLogger類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LoginLogger

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
LoginLogger(Context context, String applicationId) {
    this.applicationId = applicationId;

    appEventsLogger = AppEventsLogger.newLogger(context, applicationId);

    // Store which version of facebook is installed
    try {
        PackageManager packageManager = context.getPackageManager();
        if (packageManager != null) {
            PackageInfo facebookInfo = packageManager.getPackageInfo(FACEBOOK_PACKAGE_NAME, 0);
            if (facebookInfo != null) {
                facebookVersion = facebookInfo.versionName;
            }
        }
    } catch (PackageManager.NameNotFoundException e) {
        // Do nothing, just ignore and not log
    }
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:19,代碼來源:LoginLogger.java

示例2: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (!FacebookSdk.isInitialized()) {
        FacebookSdk.sdkInitialize(getApplicationContext());
        AppEventsLogger.activateApp(getActivity().getApplication());
    }
    // Initialize Firebase Auth
    fireBaseAuth = FirebaseAuth.getInstance();
    fireBaseAuth.signOut();

    facebookCallbackManager = CallbackManager.Factory.create();
    registerFirebase();
    registerFacebookCallback();
    LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList("email", "public_profile"));
}
 
開發者ID:Pavou,項目名稱:Stalker,代碼行數:17,代碼來源:AuthenticateFragment.java

示例3: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        if (BuildConfig.CRASH_REPORTS) {
            Fabric.with(this, new Crashlytics());
        }

        INSTANCE = this;

//        if(LeakCanary.isInAnalyzerProcess(this))
//            return;
//        LeakCanary.install(this);
        FacebookSdk.sdkInitialize(getApplicationContext());

        AppEventsLogger.activateApp(this);
        UserToken.getInstance().initSharedPreferences(this);

    }
 
開發者ID:ukevgen,項目名稱:BizareChat,代碼行數:19,代碼來源:BizareChatApp.java

示例4: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onCreate() {
  super.onCreate();
  sInstance = this;

  RealmConfiguration configuration =
      new RealmConfiguration.Builder(this).deleteRealmIfMigrationNeeded()
          .migration(new RealmMigration() {
            @Override public void migrate(DynamicRealm realm, long oldVersion, long newVersion) {
            }
          })
          .name("chao.realm")
          .build();

  Realm.setDefaultConfiguration(configuration);

  Stetho.initialize(Stetho.newInitializerBuilder(this)
      .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
      .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
      .build());

  FacebookSdk.sdkInitialize(getApplicationContext());
  AppEventsLogger.activateApp(this);
}
 
開發者ID:eneim,項目名稱:Project-Chao,代碼行數:24,代碼來源:Chao.java

示例5: onActivityResumed

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override
public void onActivityResumed(final @NonNull Activity activity) {
  if(this.isInBackground){
    this.koala.trackAppOpen();

    // Facebook: logs 'install' and 'app activate' App Events.
    AppEventsLogger.activateApp(activity);

    // Refresh the config file
    this.client.config()
      .compose(Transformers.pipeApiErrorsTo(this::handleConfigApiError))
      .compose(Transformers.neverError())
      .subscribe(c -> this.config.config(c));

    this.isInBackground = false;
  }
}
 
開發者ID:kickstarter,項目名稱:android-oss,代碼行數:18,代碼來源:ApplicationLifecycleUtil.java

示例6: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.AppTheme);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);
    //FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(getApplication());

    auth = FirebaseAuth.getInstance();
    user = auth.getCurrentUser();
    getDatabase();
    auth.addAuthStateListener(authListener);

    if (user == null) { // If there isn't a user account registered, I'm anonymous
        registerAnonymousUser();
    }

    goToNextActivity();
}
 
開發者ID:juanjecilla,項目名稱:FindMeAHome,代碼行數:22,代碼來源:SplashActivity.java

示例7: setInstalled

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
private void setInstalled(List<Installed> installedApps) {
  installedDisplayablesList.clear();
  installedDisplayablesList.add(new StoreGridHeaderDisplayable(
      new GetStoreWidgets.WSWidget().setTitle(
          AptoideUtils.StringU.getResString(R.string.updatetab_title_installed,
              getContext().getResources())), storeTabNavigator, navigationTracker));

  for (Installed installedApp : installedApps) {
    AptoideApplication application = (AptoideApplication) getContext().getApplicationContext();
    installedDisplayablesList.add(new InstalledAppDisplayable(installedApp,
        new TimelineAnalytics(analytics, AppEventsLogger.newLogger(getContext()),
            bodyInterceptorV7, httpClient, converterFactory, tokenInvalidator,
            BuildConfig.APPLICATION_ID, application.getDefaultSharedPreferences(),
            application.getNotificationAnalytics(), navigationTracker,
            application.getReadPostsPersistence()), installedRepository));
  }
  addDisplayables(installedDisplayablesList, false);
  Logger.v(TAG, "listed installed apps");
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:20,代碼來源:UpdatesFragment.java

示例8: getInstallManager

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
public InstallManager getInstallManager(int installerType) {

    if (installManagers == null) {
      installManagers = new SparseArray<>();
    }

    InstallManager installManager = installManagers.get(installerType);
    if (installManager == null) {

      installManager = new InstallManager(getApplicationContext(), getDownloadManager(),
          new InstallerFactory(new MinimalAdMapper(),
              new InstallFabricEvents(Analytics.getInstance(), Answers.getInstance(),
                  AppEventsLogger.newLogger(this)), getImageCachePath()).create(this,
              installerType), getRootAvailabilityManager(), getDefaultSharedPreferences(),
          SecurePreferencesImplementation.getInstance(getApplicationContext(),
              getDefaultSharedPreferences()),
          RepositoryFactory.getDownloadRepository(getApplicationContext().getApplicationContext()),
          RepositoryFactory.getInstalledRepository(
              getApplicationContext().getApplicationContext()));
      installManagers.put(installerType, installManager);
    }

    return installManager;
  }
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:25,代碼來源:AptoideApplication.java

示例9: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  final BodyInterceptor<BaseBody> baseBodyInterceptor =
      ((AptoideApplication) getContext().getApplicationContext()).getAccountSettingsBodyInterceptorPoolV7();
  final OkHttpClient httpClient =
      ((AptoideApplication) getContext().getApplicationContext()).getDefaultClient();
  final Converter.Factory converterFactory = WebService.getDefaultConverter();
  marketName = application.getMarketName();
  this.mActionsListener = new PhoneInputPresenter(this,
      new ContactsRepository(baseBodyInterceptor, httpClient, converterFactory,
          ((AptoideApplication) getContext().getApplicationContext()).getIdsRepository(),
          new ContactUtils(
              (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE),
              getContext().getContentResolver()),
          ((AptoideApplication) getContext().getApplicationContext()).getTokenInvalidator(),
          ((AptoideApplication) getContext().getApplicationContext()).getDefaultSharedPreferences()),
      new AddressBookAnalytics(Analytics.getInstance(),
          AppEventsLogger.newLogger(getContext().getApplicationContext())),
      new AddressBookNavigationManager(getFragmentNavigator(), entranceTag,
          getString(R.string.addressbook_about),
          getString(R.string.addressbook_data_about, marketName)));
  mGenericPleaseWaitDialog = GenericDialogs.createGenericPleaseWaitDialog(getContext());
  contactUtils = new ContactUtils(
      (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE),
      getContext().getContentResolver());
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:27,代碼來源:PhoneInputFragment.java

示例10: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    Fresco.initialize(this);

    FacebookSdk.sdkInitialize(getApplicationContext());

    AppEventsLogger.activateApp(this);

    ContentResolver.addPeriodicSync(
            AuthenticationManager.getSyncAccount(getApplicationContext()),
            ApparelContract.AUTHORITY,
            Bundle.EMPTY,
            SYNC_INTERVAL);

}
 
開發者ID:joeydeluca,項目名稱:apparel,代碼行數:17,代碼來源:ApparelApplication.java

示例11: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  AptoideApplication application = (AptoideApplication) getContext().getApplicationContext();
  sharedPreferences = application.getDefaultSharedPreferences();
  tokenInvalidator = application.getTokenInvalidator();
  baseBodyBodyInterceptor = application.getAccountSettingsBodyInterceptorPoolV7();
  httpClient = application.getDefaultClient();
  converterFactory = WebService.getDefaultConverter();
  onEmptyTextError =
      AptoideUtils.StringU.getResString(R.string.ws_error_MARG_107, getContext().getResources());
  Analytics analytics = Analytics.getInstance();
  timelineAnalytics = new TimelineAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()),
      application.getAccountSettingsBodyInterceptorPoolV7(), httpClient, converterFactory,
      tokenInvalidator, BuildConfig.APPLICATION_ID, application.getDefaultSharedPreferences(),
      application.getNotificationAnalytics(), application.getNavigationTracker(),
      application.getReadPostsPersistence());
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:19,代碼來源:CommentDialogFragment.java

示例12: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  //this object is used in loadExtras and loadExtras is called in the super
  AptoideApplication application = (AptoideApplication) getContext().getApplicationContext();
  sharedPreferences = application.getDefaultSharedPreferences();
  tokenInvalidator = application.getTokenInvalidator();
  storeCredentialsProvider = new StoreCredentialsProviderImpl(AccessorFactory.getAccessorFor(
      ((AptoideApplication) getContext().getApplicationContext()
          .getApplicationContext()).getDatabase(), Store.class));
  httpClient = application.getDefaultClient();
  converterFactory = WebService.getDefaultConverter();
  bodyInterceptor = application.getAccountSettingsBodyInterceptorPoolV7();
  final Analytics analytics = Analytics.getInstance();
  timelineAnalytics = new TimelineAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
      httpClient, converterFactory, tokenInvalidator, BuildConfig.APPLICATION_ID,
      application.getDefaultSharedPreferences(), application.getNotificationAnalytics(),
      navigationTracker, application.getReadPostsPersistence());
  super.onCreate(savedInstanceState);
  setHasOptionsMenu(true);
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:21,代碼來源:CommentListFragment.java

示例13: onViewCreated

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);
  list = (RecyclerView) view.findViewById(R.id.fragment_inbox_list);
  list.setAdapter(adapter);
  list.setLayoutManager(new LinearLayoutManager(getContext()));

  AptoideApplication application = ((AptoideApplication) getContext().getApplicationContext());
  attachPresenter(
      new InboxPresenter(this, ((ActivityResultNavigator) getContext()).getInboxNavigator(),
          ((AptoideApplication) getContext().getApplicationContext()).getNotificationCenter(),
          CrashReport.getInstance(),
          ((AptoideApplication) getContext().getApplicationContext()).getNavigationTracker(),
          application.getNotificationAnalytics(),
          new PageViewsAnalytics(AppEventsLogger.newLogger(getContext().getApplicationContext()),
              Analytics.getInstance(), navigationTracker), AndroidSchedulers.mainThread()));
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:17,代碼來源:InboxFragment.java

示例14: onCreate

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  final AptoideApplication application =
      (AptoideApplication) getContext().getApplicationContext();
  installedRepository = RepositoryFactory.getInstalledRepository(getContext());
  cancelClick = PublishRelay.create();
  postClick = PublishRelay.create();
  loginAction = PublishRelay.create();
  openUploaderButton = PublishRelay.create();
  SharedPreferences sharedPreferences =
      ((AptoideApplication) getContext().getApplicationContext()).getDefaultSharedPreferences();
  TokenInvalidator tokenInvalidator =
      ((AptoideApplication) getContext().getApplicationContext()).getTokenInvalidator();
  BodyInterceptor<BaseBody> bodyInterceptor =
      ((AptoideApplication) getContext().getApplicationContext()).getAccountSettingsBodyInterceptorPoolV7();
  OkHttpClient okHttpClient =
      ((AptoideApplication) getContext().getApplicationContext()).getDefaultClient();
  Converter.Factory converterFactory = WebService.getDefaultConverter();

  analytics = new PostAnalytics(Analytics.getInstance(),
      AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
      okHttpClient, converterFactory, tokenInvalidator, BuildConfig.APPLICATION_ID,
      sharedPreferences, application.getNavigationTracker());
  handleAnalytics();
  setHasOptionsMenu(true);
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:27,代碼來源:PostFragment.java

示例15: TimelineAnalytics

import com.facebook.appevents.AppEventsLogger; //導入依賴的package包/類
public TimelineAnalytics(Analytics analytics, AppEventsLogger facebook,
    BodyInterceptor<BaseBody> bodyInterceptor, OkHttpClient httpClient,
    Converter.Factory converterFactory, TokenInvalidator tokenInvalidator, String appId,
    SharedPreferences sharedPreferences, NotificationAnalytics notificationAnalytics,
    NavigationTracker navigationTracker, ReadPostsPersistence readPostsPersistence) {
  this.analytics = analytics;
  this.facebook = facebook;
  this.bodyInterceptor = bodyInterceptor;
  this.httpClient = httpClient;
  this.converterFactory = converterFactory;
  this.tokenInvalidator = tokenInvalidator;
  this.appId = appId;
  this.sharedPreferences = sharedPreferences;
  this.notificationAnalytics = notificationAnalytics;
  this.navigationTracker = navigationTracker;
  this.readPostsPersistence = readPostsPersistence;
}
 
開發者ID:Aptoide,項目名稱:aptoide-client-v8,代碼行數:18,代碼來源:TimelineAnalytics.java


注:本文中的com.facebook.appevents.AppEventsLogger類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。