Back to project page jive-android-core-sdk-example.
The source code is released under:
Apache License
If you think the Android project jive-android-core-sdk-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jivesoftware.example.injection; //from w w w . j a va 2 s .co m import android.content.Context; import com.jivesoftware.example.github.GitHubOauthRequestInterceptor; import com.jivesoftware.example.github.GitHubServiceFactory; import com.jivesoftware.example.github.authentication.GitHubAuthenticationErrorHandler; import com.jivesoftware.example.github.service.IGitHubRepoService; import com.jivesoftware.example.github.service.IGitHubUserService; import com.jivesoftware.example.jive.dao.JiveConnection; import com.jivesoftware.example.utils.JivePicasso; import com.jivesoftware.example.utils.PersistedKeyValueStore; import com.squareup.picasso.Picasso; import dagger.Module; import dagger.Provides; /** * Created by stephen.mclaughry on 9/23/14. */ @Module( library=true, complete=false ) public class BaseModule { @Provides public GitHubOauthRequestInterceptor provideGitHubOauthRequestInterceptor(PersistedKeyValueStore store) { return new GitHubOauthRequestInterceptor(store.getGithubToken()); } @Provides public IGitHubRepoService provideGitHubRepoService(GitHubOauthRequestInterceptor interceptor) { return GitHubServiceFactory.createRepoService(interceptor, new GitHubAuthenticationErrorHandler()); } @Provides public IGitHubUserService provideGitHubUserSearchService(GitHubOauthRequestInterceptor interceptor) { return GitHubServiceFactory.createUserSearchService(interceptor, new GitHubAuthenticationErrorHandler()); } @Provides public JiveConnection provideJiveConnection(PersistedKeyValueStore store) { return new JiveConnection(store); } @Provides public Picasso providePicasso(Context context) { return JivePicasso.instance(context); } }