问题
How can I connect an Android application to a DB2 database stored in BlueMix?
I know that some Java libraries are missing in Android, so I can't use JDBC to connect to the database.
Any Idea?
回答1:
You can not talk directly to the SQL DB on Bluemix from your android app. You will need to create an intermediary application on bluemix that talks to the db and your android app can talk to that application. You can implement this backend as a RESTful API (Java JAX-RS, Node.js w/ Express etc). The Boilerplates on Bluemix are a good place to start.
There is also the Mobile Data framework on Bluemix that simplifies this by setting up all the mobile backend for you.
来源:https://stackoverflow.com/questions/29983701/connecting-android-application-to-bluemix-stored-db2-database