當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。