Insert API KEY from aws (Amazon)

Asked

Viewed 73 times

0

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

Follow my Radle:

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’m going to use the cloud database. I’m sorry but I’m really out of Amazon. I’m going to use the database service. All I have is the key API and the json format I should send.

  • What are you trying to do? What AWS service do you want to use?

  • Cloud Database. Sorry but really I am outside of Amazon. I will use the database service. All I have is the key API and the json format I should send

1 answer

1


Henrique, okay? Dude, AWS doesn’t recommend working with API_KEY and API_SECRET_KEY within the application. They use something called Identity Provider. What does this mean? It is that you can use identity providers such as Google, Facebook, Twitter and others. Imagine that in your app you implement social login with these guys, and to implement social login with these guys you had to log into each of their development console (Google, Facebook and Twitter) and register your app. In this record you received an ID, there in AWS you put these Ids saying that these are your identity providers, and that when the user is logged in he may have access to N resources determined by you. Below are some links that can help you.

I hope I’ve helped =)

  • Thank you very much.

  • Magina @Henriquemendes, we’re together!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.