本文整理汇总了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"));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例13: onResume
import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onResume() {
super.onResume();
// Logs 'install' and 'app activate' App Events.
AppEventsLogger.activateApp(this);
}
示例14: onResume
import com.facebook.appevents.AppEventsLogger; //导入方法依赖的package包/类
@Override
protected void onResume() {
super.onResume();
if (FacebookSdk.getApplicationId() != null) {
AppEventsLogger.activateApp(this);
}
}
示例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));
}