2016-06-07 4 views
0

이 튜토리얼을 수행 변경 :명확히 AWS 튜토리얼 - 변수

이 ID 공급자를 사용하려면 CognitoCachingCredentialsProvider로를 통과해야 : http://docs.aws.amazon.com/cognito/latest/developerguide/developer-authenticated-identities.html 가 나는 프롬프트 다음 발견했다.

DeveloperAuthenticationProvider developerProvider = new DeveloperAuthenticationProvider(null, "IDENTITYPOOLID", context, Regions.USEAST1); 
CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(context, developerProvider, Regions.USEAST1); 

은 내가 위에서 언급 한 클래스에 배치해야하거나이 CognitoCachingCredentialsProvider 간다 예를 들면 다음과 같습니다입니까?

감사합니다.

답변

0

자격 증명 공급자 (이상적으로는 싱글 톤이어야 함)를 인스턴스화 할 때마다이 코드를 삽입해야합니다. 지역까지, Regions.US_EAST_1 대신 Regions.USEAST1을 사용해 볼 수 있습니까?

만약 당신이 궁금하다면 Cognito sample app에 예제가 있습니다.

0

캐싱 공급자가 아닌 DeveloperAuthenticationProvider 클래스에 대해 언급해야합니다.

+0

감사합니다. 그렇지만 import android.content.Context를 가져올 때도 "conten"오류가 발생하는 이유는 무엇입니까? Regions.US_EAST가 인식되지 않습니까? – user3795517

+0

"USEast1"로 지역 끝점을 사용해야하고 "US_East"가 아닌 이유는 그 오류가 – error2007s

+0

입니다. EAST1, 내 실수이지만 여전히 작동하지 않습니다. – user3795517

관련 문제