Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting Android app to amazon RDS

I have an Android application and I want to move my local database in the cloud. I decided for a SQL database and not for a NoSQL, because I want to execute complex queries. I created a database instance in RDS from Amazon and I populated the database.

Now I want to connect my mobile app to my cloud database. I sow samples for NoSQL database connection, but I wasn't able to find examples for RDS. I saw that it is recommended to create a web service and connect to that web service, but it seems much more complicated than using a NoSQL and this doesn't feel right.

Does Amazon offer some API/service for Android - RDS connection? Do you know any sample code that handles this aspect?

like image 880
Laviniux Avatar asked Aug 12 '13 13:08

Laviniux


People also ask

Can I make a Android app with AWS?

In this tutorial, you will create a simple Android application using AWS Amplify, a set of tools and serverless services in the cloud. In the first module, you'll build a simple Android application.


1 Answers

Does Amazon offer some API/service for Android - RDS connection?

No. AWS does not currently have an API for interacting with an RDS instance.

Do you know any sample code that handles this aspect?

You may want to access your database with PHP and get a JSON response. If your RDS instance is using MySQL then you’re in luck. There is already a lot of documentation on connecting Android to MySQL using PHP. You can get great sample code and instructions on this blog post.
Here is a very popular reference for connecting Android and MySQL.

like image 66
Mike Hines Avatar answered Oct 23 '22 00:10

Mike Hines