繁体   English   中英

是否可以使用 android 读取 aws-ssm 参数存储值?

[英]Is it possible to read aws-ssm parameter store values with android?

我正在尝试使用基于 android 的移动应用程序访问存储在 aws-ssm 参数存储中的值。

android 支持几乎所有 aws 服务,但不支持 aws-ssm。

https://aws-amplify.github.io/aws-sdk-android/docs/reference/index.html

在java库中已经有一个ssm的子库:

https://github.com/aws/aws-sdk-java/tree/master/aws-java-sdk-ssm

但这并没有真正帮助我。

我将不胜感激。

我们通过自己为我们的项目创建一个新库来实现这一点,它导入了 java 类,我们修改了它们以与 android 一起使用。

项目截图 Android Studio

build.gradle文件中的主app

implementation project(':aws-android-sdk-ssm')

以及那个库的build.gradle

apply plugin: 'com.android.library'

android {
    compileSdkVersion project.ext.compileSdkVersion
    defaultConfig {
        minSdkVersion project.ext.minSdkVersion
        targetSdkVersion project.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles 'consumer-rules.pro'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'com.amazonaws:aws-android-sdk-core:2.13.4'

    testImplementation 'junit:junit:4.12'

    androidTestImplementation 'androidx.test:core:1.2.0'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test:rules:1.2.0'

    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM