在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):amazon-archives/aws-mobile-appsync-events-starter-android开源软件地址(OpenSource Url):https://github.com/amazon-archives/aws-mobile-appsync-events-starter-android开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):AWS Mobile App Sync Starter App for Android IntroductionThis is a Starter application for using the Sample app in the AWS AppSync console when building your GraphQL API. The Sample app creates a GraphQL schema and provisions Amazon DynamoDB resources, then connects them appropriately with Resolvers. The application demonstrates GraphQL Mutations, Queries, and Offline support using AWS AppSync. You can use this for learning purposes or adapt either the application or the GraphQL Schema to meet your needs. Features
AWS Setup
Android Setup
classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:2.7.+'
apply plugin: 'com.android.application'
apply plugin: 'com.amazonaws.appsync'
android {
// Typical items
}
dependencies {
// Typical dependencies
implementation 'com.amazonaws:aws-android-sdk-appsync:2.7.+'
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
}
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!--other config-->
<application>
<service android:name="org.eclipse.paho.android.service.MqttService" />
<!--other config-->
</application>
On this same page, select Application walkthroughGenerated codeJava code is generated from a schema file ( If you update your schema in the future, you should use the AWS Amplify CLI codegen feature to automatically download and update your queries, mutations, subscriptions and the schema. For a tutorial of this, click here. ListEventsActivity.java (Query)
ViewEventActivity.java (Mutation, Query, Subscription)
AddEventActivity.java (Mutation)
Getting HelpWe use AppSync Android SDK GitHub issues for tracking questions, bugs, and feature requests. LicenseThis sample code is made available under the MIT-0 license. See the LICENSE file. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论