Java Code Examples for com.facebook.appevents.AppEventsLogger#activateApp()

The following examples show how to use com.facebook.appevents.AppEventsLogger#activateApp() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FirstLaunchAnalytics.java    From aptoide-client-v8 with GNU General Public License v3.0 6 votes vote down vote up
public Completable sendAppStart(android.app.Application application,
    SharedPreferences sharedPreferences, IdsRepository idsRepository) {

  FacebookSdk.sdkInitialize(application);
  AppEventsLogger.activateApp(application);
  AppEventsLogger.newLogger(application);
  return idsRepository.getUniqueIdentifier()
      .doOnSuccess(AppEventsLogger::setUserID)
      .toObservable()
      .doOnNext(__ -> setupRakamFirstLaunchSuperProperty(
          SecurePreferences.isFirstRun(sharedPreferences)))
      .doOnNext(__ -> sendPlayProtectEvent())
      .doOnNext(__ -> setupDimensions(application))
      .filter(__ -> SecurePreferences.isFirstRun(sharedPreferences))
      .doOnNext(
          __ -> sendFirstLaunchEvent(utmSource, utmMedium, utmCampaign, utmContent, entryPoint))
      .toCompletable()
      .subscribeOn(Schedulers.io());
}
 
Example 2
Source File: MyApp.java    From FaceT with Mozilla Public License 2.0 6 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();
        Log.d("Myapp " , " start");
//        _instance = this;
        FirebaseApp.getApps(this);
        //enable the offline capability for firebase
        if (!FirebaseApp.getApps(this).isEmpty()) {
            FirebaseDatabase.getInstance().setPersistenceEnabled(true);
        }

        EmojiManager.install(new EmojiOneProvider());
        Picasso.Builder builder = new Picasso.Builder(this);
//        builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
        Picasso built = builder.build();
//        built.setIndicatorsEnabled(false);
//        built.setLoggingEnabled(true);
        Picasso.setSingletonInstance(built);

        // Initialize the SDK before executing any other operations,
        FacebookSdk.sdkInitialize(getApplicationContext());
        AppEventsLogger.activateApp(this);
    }
 
Example 3
Source File: LoginActivity.java    From Simple-Blog-App with MIT License 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(this);

    bindViews();

    onClicks();

}
 
Example 4
Source File: LoginActivity.java    From FaceT with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void onResume() {
    super.onResume();

    // Logs 'install' and 'app activate' App Events.
    AppEventsLogger.activateApp(this);
}
 
Example 5
Source File: SplashActivity.java    From openshop.io-android with MIT License 5 votes vote down vote up
@Override
protected void onResume() {
    super.onResume();

    // Logs 'install' and 'app activate' App Events.
    AppEventsLogger.activateApp(this);
}
 
Example 6
Source File: MainActivity.java    From openshop.io-android with MIT License 5 votes vote down vote up
@Override
protected void onResume() {
    super.onResume();
    // FB base events logging
    AppEventsLogger.activateApp(this);

    // GCM registration
    LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReceiver,
            new IntentFilter(SettingsMy.REGISTRATION_COMPLETE));
}
 
Example 7
Source File: AndroidGDXFacebook.java    From gdx-facebook with Apache License 2.0 5 votes vote down vote up
public AndroidGDXFacebook(final Activity activity, final GDXFacebookConfig config) {
    super(config);
    this.activity = activity;

    FacebookSdk.sdkInitialize(activity.getApplicationContext());
    AppEventsLogger.activateApp(activity.getApplication());
    callbackManager = CallbackManager.Factory.create();

}
 
Example 8
Source File: AndroidGDXFacebook.java    From gdx-facebook with Apache License 2.0 5 votes vote down vote up
public AndroidGDXFacebook(final AndroidFragmentApplication activity, final GDXFacebookConfig config) {
    super(config);
    this.activity = activity.getActivity();

    FacebookSdk.sdkInitialize(this.activity.getApplicationContext());
    AppEventsLogger.activateApp(this.activity.getApplication());
    callbackManager = CallbackManager.Factory.create();

}
 
Example 9
Source File: FacebookProvider.java    From android with Apache License 2.0 4 votes vote down vote up
@Override
public void initialize(Application application) {
    FacebookSdk.sdkInitialize(application.getApplicationContext());
    AppEventsLogger.activateApp(application);
}
 
Example 10
Source File: Stockita.java    From stockita-point-of-sale with MIT License 3 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    // Track App installs and App opens by facebook
    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(this);


    // Enable data persistence Firebase.
    FirebaseDatabase.getInstance().setPersistenceEnabled(true);

}