Connecting Android application to BlueMix stored D

2019-07-24 09:42发布

问题:

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.