Created
September 11, 2018 17:29
-
-
Save adrianhall/41ec0529e84cef8ba30148f8eefec190 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.amazonaws.mobile.samples.picturefeed.services.aws | |
import android.content.Context | |
import com.amazonaws.auth.AWSCredentialsProvider | |
import com.amazonaws.mobile.auth.core.IdentityManager | |
import com.amazonaws.mobile.auth.userpools.CognitoUserPoolsSignInProvider | |
import com.amazonaws.mobile.config.AWSConfiguration | |
class AWSService(context: Context) { | |
val configuration = AWSConfiguration(context) | |
val identityManager : IdentityManager | |
val credentialsProvider : AWSCredentialsProvider | |
init { | |
identityManager = IdentityManager(context, configuration) | |
identityManager.addSignInProvider(CognitoUserPoolsSignInProvider::class.java) | |
IdentityManager.setDefaultIdentityManager(identityManager) | |
credentialsProvider = identityManager.credentialsProvider | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment