JDBC vs Web Service for Android

前端 未结 4 1699
广开言路
广开言路 2020-11-22 01:27

Can someone answer on my dilemma which method to use for connecting Android device to mySQL or Postgresql?

I can do it in both ways without any erro

4条回答
  •  半阙折子戏
    2020-11-22 01:52

    Besides all things Craig Ringer said, which I completely agree, JDBC has another problem: it will force to expose your database to the world. If you want android devices to access it, you will need to provide your app with database credentials, and the database will have to have public access.

    Using a WebService or RESTful API is clearly the way to go to make your application secure.

提交回复
热议问题