当前位置: 首页>>代码示例>>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;未经允许,请勿转载。