How to connect Android to a database server

前端 未结 6 1826
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 04:12

Is there any sample? I have my android application and I need to connect to mysql server on my machine, what is the best way?

I should not use jdbc, explanation here

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 04:34

    You won't be able to connect directly to a MySQL database with the HttpClient, as the MySQL database doesn't operate on that protocol.

    The second part of the answer to the question you linked recommends going with web services and consuming those to communicate with the database server. Which is exactly what you would be able to do with the HttpClient.

提交回复
热议问题