Insert aws KEY API (amazon)

0

I'd like to know where to insert the Amazon KEY API into my android project. I will use a database installed on Amazon to record and fetch my data.

Follow my gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
    compile 'com.amazonaws:aws-android-sdk-s3:2.2.+'
    compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
}

My Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="projeto.projeto_desafio">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <!-- Allows the API to use the Global Positioning System (GPS) to determine the device's location to within a very small area. -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <!-- Allows the API to use WiFi or mobile cell data (or both) to determine the device's location. -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".activity.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>

</manifest>

EDIT: I will use the database in the cloud. Sorry but I really am outside Amazon. I will use the database service. Just what I have is the API key and json format that I should send.

    
asked by anonymous 25.06.2016 / 17:51

1 answer

1

Henry, how are you? Man, AWS does not recommend working with API_KEY and API_SECRET_KEY inside the application. They use a thing called Identity Provider . What does that mean ? It is that you can use identity providers such as Google, Facebook, Twitter among others. Imagine that in your app you implement social login with these guys, and to implement social login with these guys you had to go into each of their development console ( Google , Facebook and Twitter ) and register your application. In this registry you received an ID, there in AWS you put those IDs saying that these are your identity providers, and that when the user is logged in he can have access to N resources determined by you. Here are some links that can help you.

I hope I have helped =)

    
26.06.2016 / 23:09