1

I am making an app which requires a database, so I want to use PostgreSQL from Google Cloud Platform, I did not find any tutorials helping me to do that, How to access the data? a link at Can i use PostgreSQL or mySQL in android App development no longer works or outdated, found the REST API documentation for Cloud SQL but unable to understand if these APIs are just to access DATABASE or the data inside DATABASE?

2

1 Answer 1

1

As mentioned in the accepted answer to the post suggested by @JGH, there are a few ways to access data of a DB from an Android App.

The most commonly used way is definitely by communicating to a service hosted on a server that can connect to the DB, and provides endpoints to request any operation (read, write, update, delete).

However, since you specified a direct connection from the Android App to the Cloud SQL instance, the best option would be to try to make it work with the JDBC connecting to, possibly, a public IP of the Cloud SQL instance. You may find more information in the Connecting to Cloud SQL from external applications documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.