Updating deprecated AWS Amplify setup with the latest Amplify setup - android

my current Android project, which was just handed over to me, used a depricated AWS Amplify setup. I found this documentation and checked it against the code.
https://aws.amazon.com/blogs/mobile/building-an-android-app-with-aws-amplify-part-1/
It says that "This post has been deprecated. Instead, please see the new Amplify Android Getting Started tutorial to learn how to build Android mobile applications using AWS Amplify." and instead points me to this. https://docs.amplify.aws/start/q/integration/android
Can you point me to the right direction on how can I safely migrate the old AWS Amplify setup of my Android project to the new setup.
Thank you!
By the way I am using Android Studio.

Related

AWS Android Project Sign on

I just tried AWS for the first time to build a basic hello world android app with user authentication and I seem to be missing something critical. I worked with Android apps before so I have all the software setup there plus AWS CLI installed I created an android project in AWS Mobile Hub, created user pool, I configured signon/register add on in my new AWS project and I clicked on Integrate button but I'm not sure what's next. I saw on youtube some people had build and test buttons that they used to generate Android Studio project on a menu on the left, I'm not seeing any of that, how can I build a skeleton project in AWS to download so I can finalize it with Android Studio? Any help would be appreciated.
Thank you
Here is a link which teach you step by step on how to build a skeleton project in AWS https://github.com/aws-samples/aws-mobile-android-notes-tutorial/blob/master/tutorial/analytics.md.

How to synchronize GraphQL changes from Appsync to Android using amplify?

I migrated a flutter native plugin for appsync to amplify.
Now I wonder how to generate code in the android part of my flutter project after updating the GraphQL in the appsync console.
Initially i used:
amplify init
amplify add api
amplify add codegen --apiId <MY-API-ID>
this worked like a charm.
However when I want to generate updated code using
amplify api update
I get the reply
The selected resource is not managed using AWS Cloudformation. Please use the AWS AppSync Console to make updates to your API - de.sistar.fcsp_rad
So I guess I did not understand the whole workflow. How do I update my android client project after updating the GraphQL in the AWS Appsync Console?
Run amplify codegen statements to regenerate the queries and such, then kick off a Gradle build again.
https://aws-amplify.github.io/docs/cli/codegen#amplify-codegen-statements-

NoClassDefFoundError while creating AmazonSNSClient using AWS SDK for Java

In my Android app I want to work with Amazon SNS
AmazonSNSClient snsClient = new AmazonSNSClient(new ClasspathPropertiesFileCredentialsProvider());
But I got this error:
Caused by: java.lang.NoClassDefFoundError: com.amazonaws.services.sns.AmazonSNSClient
I use Eclipse Luna and installed AWS Toolkit for Eclipse.
In Java Build Path of my Project, I selected "Add Library" -> "AWS SDK for Java".
I don't know how to solve this problem. Please help me!
AWS has an SDK specifically for Android https://aws.amazon.com/mobile/sdk/.
A getting started guide, including how to set up in Eclipse (Or use Android Studio / Maven) is available at http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/setup.html.
I also highly suggest not embedding credentials in your application when releasing it, as it is highly insecure and anyone could decompile your app and steal your credentials. Instead I suggest looking at Amazon Cognito for authentication (it's in the guide linked above).

Mobile Backend Starter Java - on Android Studio

Has anyone managed to extend "Mobile Backend Starter Java" on Android Studio
https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-java
Frustratingly any documentation that exists seems out of date or only for Eclipse".
I want to use Gradle and not Maven , Android Studio and not Eclipse
I followed the Tutorial
https://developers.google.com/cloud/samples/mbs/
but the extend page left me confused
https://developers.google.com/cloud/samples/mbs/extend_backend
I would like to know if anyone has tried this
I thought about going from the other direction creating an app and then Google Cloud Tools and App Engine Backend with Google Cloud Messaging but I do not see a deploy , I did see this, Deploy Google App Engine backend from Android Studio
but have not tried yet
There is a project on GitHub which you can use as module. It provides you with the basic client libraries. You can use it as starting point. See https://github.com/thagikura/mobile-backend-starter-android-client-with-AndroidStudio and follow the instructions there.

mobile backend starter import to android studio

This is my first post in StackOverflow.
I am building an android app using Android Studio. This app requires some cloud backend to sync user data across devices. After some research, I came across the Mobile Backend Starter from google which provides a fully deployed app engine backend and a client android application.
The problem is that every video/tutorial out there is using Eclipse to open this client application. When you try to import it to Android Studio, you get an Assertion:Null error.
Another step I tried is that, I opened it in Eclipse, followed google documentation to set
And then tried to import to Android Studio. This time I got an error that the "The filename, directory name, or volume label syntax is incorrect"
Can someone help me out with this? Is it also possible to use the "Generate Mobile Backend" option in android studio? But wouldnt this mean that we cannot leverage the client libraries provided in Mobile Backend Starter?
Edit (to add more details to the question):
If I use the "Tools > Google Cloud Tools > Generate App Engine Backend" method, will I be able to get all the boiler plate code in the Mobile Backend android client?
Also, I tried today to Generate App Engine Backend and point to my existing Mobile Backend Starter app engine project. But this did not bring in end point connections for mobilebackend api. Am I missing something here?
Yes there is an option in Android Studio also for Generating App Engine Backend.
Tools > Google Cloud Tools > Generate App Engine Backend
Here is a nice tutorial on Android Blog for the same
http://android-developers.blogspot.in/2013/06/adding-backend-to-your-app-in-android.html
But look in to this post before doing this as Google App Engine Back-end still uses maven so you need to install that before using it.
Maven needed when generating Google App Engine backend in Android Studio
This is an old question but for those that come to this now the easiest way to get started is with this unofficial build for android studio. Why couldn't google do this themselves?
https://github.com/thagikura/mobile-backend-starter-android-client-with-AndroidStudio

Categories

Resources