desenvolvendo aplicacoes moveis android na nuvem da amazon web services
Post on 15-Jan-2015
1.623 Views
Preview:
DESCRIPTION
TRANSCRIPT
5 bilhões de celulares no mundo
Mais de 1 milhão de apps nas App Stores
32 bilhões de apps serão baixadas em 2012
50 bilhões de dólares em apps e músicas
Exemplo
Servidor Micro On-demand 100% - A partir de 15 dólares
Reservado 100% - A partir de 6,5 dólares
AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager.ddb();
KeySchemaElement kse = new KeySchemaElement().withAttributeName(
"userNo").withAttributeType(ScalarAttributeType.N);
KeySchema ks = new KeySchema().withHashKeyElement(kse);
ProvisionedThroughput pt = new ProvisionedThroughput()
.withReadCapacityUnits(10l).withWriteCapacityUnits(5l);
CreateTableRequest request = new CreateTableRequest()
.withTableName(PropertyLoader.getInstance().getTestTableName())
.withKeySchema(ks).withProvisionedThroughput(pt);
ddb.createTable(request);
RegisterDeviceRequest registerDeviceRequest = new RegisterDeviceRequest(
this.endpoint, this.useSSL, uid, key);
ResponseHandler handler = new ResponseHandler();
response = this.processRequest(registerDeviceRequest, handler);
if (response.requestWasSuccessful()) {
AmazonSharedPreferencesWrapper.registerDeviceId(
this.sharedPreferences, uid, key);
}
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, PHOTO_SELECTED);
AmazonS3Client s3Client = new AmazonS3Client( new BasicAWSCredentials(
MY_ACCESS_KEY_ID, MY_SECRET_KEY ) );
PutObjectRequest por = new PutObjectRequest( Constants.getPictureBucket(),
Constants.PICTURE_NAME, new java.io.File( filePath) );
s3Client.putObject( por );
top related