本文整理汇总了Java中com.amazonaws.mobileconnectors.cognito.CognitoSyncManager类的典型用法代码示例。如果您正苦于以下问题:Java CognitoSyncManager类的具体用法?Java CognitoSyncManager怎么用?Java CognitoSyncManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CognitoSyncManager类属于com.amazonaws.mobileconnectors.cognito包,在下文中一共展示了CognitoSyncManager类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initCredentialsProvider
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
@ReactMethod
public void initCredentialsProvider(String identityPoolId, String token, String region)
{
RegionUtils regionUtils = new RegionUtils();
Region awsRegion = regionUtils.getRegion(region);
cognitoCredentialsProvider = new CognitoCachingCredentialsProvider(
mActivityContext.getApplicationContext(),
identityPoolId,
// awsRegion);
Regions.EU_WEST_1);
cognitoClient = new CognitoSyncManager(
mActivityContext.getApplicationContext(),
// awsRegion,
Regions.EU_WEST_1,
cognitoCredentialsProvider);
}
开发者ID:morcmarc,项目名称:react-native-cognito,代码行数:19,代码来源:ReactCognitoModule.java
示例2: AWSMobileClient
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
private AWSMobileClient(final Context context,
final String cognitoIdentityPoolID,
final Regions cognitoRegion,
final String mobileAnalyticsAppID,
final IdentityManager identityManager,
final ClientConfiguration clientConfiguration) {
this.context = context;
this.identityManager = identityManager;
this.clientConfiguration = clientConfiguration;
try {
this.mobileAnalyticsManager =
MobileAnalyticsManager.
getOrCreateInstance(context,
AWSConfiguration.AMAZON_MOBILE_ANALYTICS_APP_ID,
AWSConfiguration.AMAZON_MOBILE_ANALYTICS_REGION,
identityManager.getCredentialsProvider(),
new AnalyticsConfig(clientConfiguration));
}
catch (final InitializationException ie) {
Log.e(LOG_TAG, "Unable to initalize Amazon Mobile Analytics. " + ie.getMessage(), ie);
}
this.syncManager = new CognitoSyncManager(context, AWSConfiguration.AMAZON_COGNITO_REGION,
identityManager.getCredentialsProvider(), clientConfiguration);
this.dynamoDBClient = new AmazonDynamoDBClient(identityManager.getCredentialsProvider(), clientConfiguration);
this.dynamoDBMapper = new DynamoDBMapper(dynamoDBClient);
}
开发者ID:jtran064,项目名称:PlatePicks-Android,代码行数:30,代码来源:AWSMobileClient.java
示例3: init
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
public static void init(Context context)
{
provider = new CognitoCachingCredentialsProvider(context,
AWS_ACCOUNT_ID, COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH,
COGNITO_ROLE_AUTH, Regions.US_EAST_1);
//initialize the clients
cognitosync = new CognitoSyncManager(context, Regions.US_EAST_1, provider);
manager = new TransferManager(provider);
ddb = new AmazonDynamoDBClient(provider);
//ddbmapper = new DynamoDBMapper(ddb);
analytics = MobileAnalyticsManager.getOrCreateInstance(context, MOBILE_ANALYTICS_APP_ID, Regions.US_EAST_1, provider);
kinesis = new KinesisRecorder(context.getDir(KINESIS_DIRECTORY_NAME, 0), Regions.US_EAST_1, provider);
lambda = new LambdaInvokerFactory(context, Regions.US_WEST_2, provider);
}
开发者ID:jinman,项目名称:snake-game-aws,代码行数:16,代码来源:AWSClientManager.java
示例4: getCognitoSync
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
/**
* Gets the singleton instance of the CognitoClient. init() must be call
* prior to this.
*
* @return an instance of CognitoClient
*/
public static CognitoSyncManager getCognitoSync() {
if (cognitosync == null) {
throw new IllegalStateException("client not initialized yet");
}
return cognitosync;
}
开发者ID:jinman,项目名称:snake-game-aws,代码行数:13,代码来源:AWSClientManager.java
示例5: getInstance
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
/**
* Gets the singleton instance of the CognitoClient. init() must be called
* prior to this.
*
* @return an instance of CognitoClient
*/
public static CognitoSyncManager getInstance() {
if (syncClient == null) {
throw new IllegalStateException("CognitoSyncClientManager not initialized yet");
}
return syncClient;
}
开发者ID:awslabs,项目名称:aws-sdk-android-samples,代码行数:13,代码来源:CognitoSyncClientManager.java
示例6: AccountManager
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
/**
* Hidden default constructor (singleton)
*/
private AccountManager() {
// Initializing the CredentialsProvider
credentialsProvider = new CognitoCachingCredentialsProvider (
context,
context.getString(R.string.aws_identity_pool), // Identity Pool ID
Regions.EU_WEST_1 // Put your own region here
);
// Initializing the Sync Manager
syncManager = new CognitoSyncManager(
context,
Regions.EU_WEST_1,
credentialsProvider);
dataset = syncManager.openOrCreateDataset(DATASET_NAME);
Log.v(TAG, "Created AccountManager...");
}
开发者ID:ironbird-software,项目名称:aws-cognito-sync-issues,代码行数:27,代码来源:AccountManager.java
示例7: getSyncManager
import com.amazonaws.mobileconnectors.cognito.CognitoSyncManager; //导入依赖的package包/类
/**
* Gets the Amazon Cognito Sync Manager, which is responsible for saving and
* loading user profile data, such as game state or user settings.
* @return sync manager
*/
public CognitoSyncManager getSyncManager() {
return syncManager;
}
开发者ID:jtran064,项目名称:PlatePicks-Android,代码行数:9,代码来源:AWSMobileClient.java
注:本文中的com.amazonaws.mobileconnectors.cognito.CognitoSyncManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论