use of org.edx.mobile.http.serialization.JsonPageDeserializer in project edx-app-android by edx.
the class EdxDefaultModule method configure.
@Override
public void configure() {
Config config = new Config(context);
bind(IDatabase.class).to(IDatabaseImpl.class);
bind(IDownloadManager.class).to(IDownloadManagerImpl.class);
bind(NotificationDelegate.class).to(DummyNotificationDelegate.class);
bind(IEdxEnvironment.class).to(EdxEnvironment.class);
bind(LinearLayoutManager.class).toProvider(LinearLayoutManagerProvider.class);
bind(EventBus.class).toInstance(EventBus.getDefault());
bind(Gson.class).toInstance(new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).registerTypeAdapterFactory(ISO8601DateTypeAdapter.FACTORY).registerTypeAdapter(Page.class, new JsonPageDeserializer()).registerTypeAdapter(BlockData.class, new BlockData.Deserializer()).registerTypeAdapter(BlockType.class, new BlockType.Deserializer()).registerTypeAdapter(BlockList.class, new BlockList.Deserializer()).serializeNulls().create());
bind(OkHttpClientProvider.class).to(OkHttpClientProvider.Impl.class);
bind(RetrofitProvider.class).to(RetrofitProvider.Impl.class);
bind(OkHttpClient.class).toProvider(OkHttpClientProvider.Impl.class).in(Singleton.class);
bind(Retrofit.class).toProvider(RetrofitProvider.Impl.class).in(Singleton.class);
bind(LoginService.class).toProvider(LoginService.Provider.class).in(Singleton.class);
bind(CourseService.class).toProvider(CourseService.Provider.class).in(Singleton.class);
bind(DiscussionService.class).toProvider(DiscussionService.Provider.class).in(Singleton.class);
bind(UserService.class).toProvider(UserService.Provider.class).in(Singleton.class);
bind(IStorage.class).to(Storage.class);
requestStaticInjection(CallUtil.class, BrowserUtil.class, MediaConsentUtils.class, DiscussionTextUtils.class, AppStoreUtils.class);
}
Aggregations