本文整理汇总了Java中com.twitter.sdk.android.core.DefaultLogger类的典型用法代码示例。如果您正苦于以下问题:Java DefaultLogger类的具体用法?Java DefaultLogger怎么用?Java DefaultLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultLogger类属于com.twitter.sdk.android.core包,在下文中一共展示了DefaultLogger类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TwitterHelper
import com.twitter.sdk.android.core.DefaultLogger; //导入依赖的package包/类
/**
* Public constructor. This will initialize twitter sdk.
*
* @param twitterApiKey twitter api key
* @param twitterSecreteKey twitter secrete key
* @param response {@link TwitterResponse} response listener.
* @param context instance of the caller.
*/
public TwitterHelper(@StringRes final int twitterApiKey,
@StringRes final int twitterSecreteKey,
@NonNull TwitterResponse response,
@NonNull Activity context) {
//noinspection ConstantConditions
if (response == null) throw new IllegalArgumentException("TwitterResponse cannot be null.");
mActivity = context;
mListener = response;
//initialize sdk
TwitterConfig authConfig = new TwitterConfig.Builder(context)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(context.getResources().getString(twitterApiKey),
context.getResources().getString(twitterSecreteKey)))
.debug(true)
.build();
Twitter.initialize(authConfig);
mAuthClient = new TwitterAuthClient();
}
开发者ID:multidots,项目名称:android-social-signin-helper,代码行数:31,代码来源:TwitterHelper.java
示例2: setUp
import com.twitter.sdk.android.core.DefaultLogger; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
createMocks();
// Initialize Fabric with mock executor so that kit#doInBackground() will not be called
// during kit initialization.
final TwitterConfig config = new TwitterConfig.Builder(getContext())
.logger(new DefaultLogger(Log.DEBUG))
.executorService(mock(ThreadPoolExecutor.class))
.build();
Twitter.initialize(config);
final TwitterCore twitterCore = TwitterCoreTestUtils.createTwitterCore(
new TwitterAuthConfig("", ""), clients, apiClient);
tweetUi = TweetUi.getInstance();
final TweetRepository tweetRepository = new TweetRepository(mainHandler,
mock(SessionManager.class), twitterCore);
tweetUi.setTweetRepository(tweetRepository);
tweetUi.setImageLoader(picasso);
}
开发者ID:twitter,项目名称:twitter-kit-android,代码行数:24,代码来源:TweetUiTestCase.java
示例3: onCreate
import com.twitter.sdk.android.core.DefaultLogger; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sInstance = this;
Fabric.with(this, new Crashlytics());
StringsManager.initialize();
TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(Constants.TWITTER_CONSUMER_KEY, Constants.TWITTER_CONSUMER_SECRET))
.debug(true)
.build();
Twitter.initialize(config);
//Create Notification channel in Android O
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
if (notificationManager != null) {
NotificationChannel mChannel = new NotificationChannel("referendum",
StringsManager.getString("notification_channel_name"), NotificationManager.IMPORTANCE_HIGH);
mChannel.setDescription(StringsManager.getString("notification_channel_description"));
mChannel.enableLights(true);
mChannel.setLightColor(Color.RED);
notificationManager.createNotificationChannel(mChannel);
}
}
}
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:31,代码来源:UOctubreApplication.java
示例4: setupTwitter
import com.twitter.sdk.android.core.DefaultLogger; //导入依赖的package包/类
private void setupTwitter() {
Twitter.initialize(new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.debug(BuildConfig.DEBUG)
.build());
// Temporary fix for ANR https://github.com/twitter/twitter-kit-android/issues/89
new Thread(TweetUi::getInstance).start();
}
开发者ID:Gnzlt,项目名称:UCOmove,代码行数:10,代码来源:UCOmoveApplication.java
示例5: onCreate
import com.twitter.sdk.android.core.DefaultLogger; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
instance = this;
// Init Facebook
AppEventsLogger.activateApp(this);
// Init Crashlytics and Twitter
Fabric.with(this, new Crashlytics());
TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(getString(R.string.twitter_key), getString(R.string.twitter_secret)))
.debug(true)
.build();
Twitter.initialize(config);
// Configure the graph for dagger
objectGraph = ObjectGraph.create(getModules().toArray());
// Calligraphy Configuration
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath(getString(R.string.font))
.setFontAttrId(R.attr.fontPath)
.build()
);
}
开发者ID:juanjecilla,项目名称:FindMeAHome,代码行数:30,代码来源:ApplicationClass.java
注:本文中的com.twitter.sdk.android.core.DefaultLogger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论