Search in sources :

Example 1 with ContactNotificationMessageProvider

use of com.rongseal.message.ContactNotificationMessageProvider in project SeaStar by 13120241790.

the class App method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    // rongcloud 初始化
    RongIM.init(this);
    if (getApplicationInfo().packageName.equals(getCurProcessName(getApplicationContext()))) {
        RongCloudEvent.init(this);
        RongIM.registerMessageType(AgreedFriendRequestMessage.class);
        RongIM.registerMessageTemplate(new ContactNotificationMessageProvider());
    }
    // BugTags 初始化
    Bugtags.start(BUGTAGS_APPKEY, this, Bugtags.BTGInvocationEventBubble);
    // 友盟session时间间隔
    MobclickAgent.setSessionContinueMillis(30 * 60 * 1000);
    // oneCore 打印参数
    NLog.setDebug(true);
    options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.rp_default_head).showImageOnFail(R.drawable.rp_default_head).showImageOnLoading(R.drawable.rp_default_head).displayer(new FadeInBitmapDisplayer(300)).cacheInMemory(true).cacheOnDisk(true).build();
    // 初始化图片下载组件
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().diskCacheSize(50 * 1024 * 1024).diskCacheFileCount(200).diskCacheFileNameGenerator(new Md5FileNameGenerator()).defaultDisplayImageOptions(options).build();
    // Initialize ImageLoader with configuration.
    ImageLoader.getInstance().init(config);
}
Also used : ContactNotificationMessageProvider(com.rongseal.message.ContactNotificationMessageProvider) FadeInBitmapDisplayer(com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer) Md5FileNameGenerator(com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator) ImageLoaderConfiguration(com.nostra13.universalimageloader.core.ImageLoaderConfiguration)

Aggregations

Md5FileNameGenerator (com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator)1 ImageLoaderConfiguration (com.nostra13.universalimageloader.core.ImageLoaderConfiguration)1 FadeInBitmapDisplayer (com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer)1 ContactNotificationMessageProvider (com.rongseal.message.ContactNotificationMessageProvider)1