当前位置: 首页>>代码示例>>Java>>正文


Java AppEventsLogger.activateApp方法代码示例

本文整理汇总了Java中com.facebook.appevents.AppEventsLogger.activateApp方法的典型用法代码示例。如果您正苦于以下问题:Java AppEventsLogger.activateApp方法的具体用法?Java AppEventsLogger.activateApp怎么用?Java AppEventsLogger.activateApp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.appevents.AppEventsLogger的用法示例。


在下文中一共展示了AppEventsLogger.activateApp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: setup

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
public static void setup(Application application){

        //Setup Fabric
        Fabric.with(application, new Crashlytics());

        //Setup amplitude
        Amplitude.getInstance().initialize(application, BuildConfig.AMPLITUDE_SDK).enableForegroundTracking(application);

        //Setup Facebook
        FacebookSdk.sdkInitialize(application);
        AppEventsLogger.activateApp(application);
    }
 
开发者ID:Bruno125,项目名称:Unofficial-Ups,代码行数:13,代码来源:AnalyticsManager.java

示例5: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    sInstance = this;
    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(this);
    OneSignal.startInit(this).setNotificationOpenedHandler(new MADBikeNotificationOpenedHandler(this)).init();
    Branch.getAutoInstance(this);
    Dexter.initialize(this);
}
 
开发者ID:Mun0n,项目名称:MADBike,代码行数:11,代码来源:MADBikeApplication.java

示例6: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    generator();
    FacebookSdk.sdkInitialize(getApplicationContext());
    callbackManager = CallbackManager.Factory.create();
    AppEventsLogger.activateApp(this);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_main);
    LogSaver.appendLog(TAG);
    logoiv = (ImageView) findViewById(R.id.imageView);
    TextView tv2016= (TextView) findViewById(R.id.l2016);
    Typeface typeface1=Typeface.createFromAsset(getAssets(),"canaro_extra_bold.otf");
    tv2016.setTypeface(typeface1);
    Typeface typeface=Typeface.createFromAsset(getAssets(),"canaro_extra_bold.otf");
    ShimmerTextView textView = (ShimmerTextView) findViewById(R.id.shimmertv);
    KenBurnsView kenBurnsView= (KenBurnsView) findViewById(R.id.kbview);
    kenBurnsView.animate().setDuration(500).start();
    if (textView != null) {
        textView.setTypeface(typeface);
    }
    Shimmer shimmer = new Shimmer();
    shimmer.start(textView);
    nextActivity();

}
 
开发者ID:rishabh115,项目名称:Odyssey2017,代码行数:29,代码来源:MainActivity.java

示例7: facebookGraphRequest

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
public void facebookGraphRequest() {
    if (!FacebookSdk.isInitialized()) {
        FacebookSdk.sdkInitialize(getApplicationContext());
        AppEventsLogger.activateApp(getApplication());
    }
    GraphRequest request = GraphRequest.newMeRequest(
            //loginResult.getAccessToken(),
            AccessToken.getCurrentAccessToken(),
            new GraphRequest.GraphJSONObjectCallback() {
                @Override
                public void onCompleted(JSONObject object, GraphResponse response) {
                    Log.v(TAG, response.toString());

                    // Application code
                    try {
                        if (object == null) return;
                        Person person = new Person();
                        String name = object.getString("name");
                        String gender = object.getString("gender"); // 01/31/1980 format
                        String id = object.getString("id");
                        Log.d(TAG, "Name: " + name + ". Gender: " + gender);
                        person.setName(name);
                        person.setId(id);
                        person.setLink("http://www.facebook.com/" + id);

                        dataKey = mPlaceReference.push().getKey();
                        mPlaceReference.child(dataKey).setValue(person);


                    } catch (JSONException e) {
                        e.printStackTrace();

                    }
                }
            });
    Bundle parameters = new Bundle();
    parameters.putString("fields", "id,name,email,gender,birthday");
    request.setParameters(parameters);
    request.executeAsync();
}
 
开发者ID:Pavou,项目名称:Stalker,代码行数:41,代码来源:PeopleListActivity.java

示例8: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(getApplication());

    setContentView(R.layout.activity_main);

    fragmentManager = getFragmentManager();
    initAwarenessClient();
    requestLocationPermission();
}
 
开发者ID:Pavou,项目名称:Stalker,代码行数:14,代码来源:MainActivity.java

示例9: init

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
public void init (String p_appID) {
	APP_ID = p_appID;

	FacebookSdk.sdkInitialize(activity);
	FacebookSdk.setApplicationId(APP_ID);

	initCallbacks();

	AppEventsLogger.activateApp(activity);
	Utils.callScriptFunc("initialized", "true");
	Utils.d("Facebook:Initialized");

	onStart();
}
 
开发者ID:FrogSquare,项目名称:GDFacebook,代码行数:15,代码来源:FacebookSDK.java

示例10: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }
    AppInjector.init(this);

    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(this);
}
 
开发者ID:hbmartin,项目名称:firebase-chat-android-architecture-components,代码行数:12,代码来源:ChatApp.java

示例11: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    refWatcher = LeakCanary.install(this);
    instance = this;
    Realm.init(this);
    RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
            .name(getString(R.string.realm_database_name))
            .schemaVersion(Long.parseLong(getString(R.string.realm_database_schemaversion)))
            .deleteRealmIfMigrationNeeded()
            .build();
    Realm.setDefaultConfiguration(realmConfiguration);
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
        Stetho.initializeWithDefaults(this);
    }
    Picasso.setSingletonInstance(new Picasso.Builder(this)
            .downloader(new OkHttp3Downloader(OkHttpSingleton.getClient()))
            .build());
    FacebookSdk.sdkInitialize(getApplicationContext());
    AppEventsLogger.activateApp(this);
    Mapbox.getInstance(this, getResources().getString(R.string.mapbox_token));
    Config config = new Config(getResources().getString(R.string.uservoice_site));
    config.setTopicId(getResources().getInteger(R.integer.uservoice_topic_id));
    config.setShowForum(false);
    config.setShowKnowledgeBase(false);
    config.setShowPostIdea(false);
    if (PreferenceUtils.hasUserId(this) && PreferenceUtils.hasUserFullname(this) && PreferenceUtils.hasUserEmail(this)) {
        config.identifyUser(PreferenceUtils.getUserId(this), PreferenceUtils.getUserFullname(this), PreferenceUtils.getUserEmail(this));
    }
    UserVoice.init(config, this);
    Raven.init(this);
    Utils.setRavenUser(this);
}
 
开发者ID:Turistforeningen,项目名称:SjekkUT,代码行数:38,代码来源:SjekkUTApplication.java

示例12: onCreate

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

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


    setContentView(R.layout.activity_main);

    info = (TextView)findViewById(R.id.info);
    loginButton = (LoginButton)findViewById(R.id.login_button);
    loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {
            info.setText(
                    "User ID: "
                            + loginResult.getAccessToken().getUserId()
                            + "\n" +
                            "Auth Token: "
                            + loginResult.getAccessToken().getToken()
            );
        }

        @Override
        public void onCancel() {

        }

        @Override
        public void onError(FacebookException e) {

        }
    });

    count = (TextView) findViewById(R.id.count);
    sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
}
 
开发者ID:rfxlab,项目名称:analytics-with-rfx,代码行数:40,代码来源:MainActivity.java

示例13: onResume

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();

    // Logs 'install' and 'app activate' App Events.
    AppEventsLogger.activateApp(this);
}
 
开发者ID:clementf2b,项目名称:FaceT,代码行数:8,代码来源:LoginActivity.java

示例14: onResume

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    if (FacebookSdk.getApplicationId() != null) {
        AppEventsLogger.activateApp(this);
    }
}
 
开发者ID:lukamarin,项目名称:Rocket.Chat-android,代码行数:8,代码来源:BaseActivity.java

示例15: onResume

import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@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));
}
 
开发者ID:openshopio,项目名称:openshop.io-android,代码行数:11,代码来源:MainActivity.java


注:本文中的com.facebook.appevents.AppEventsLogger.activateApp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。