duangao7133 2011-11-25 20:52
浏览 51

在ListView中从php服务器检索mysql数据到android

I would like to know if there is any way to retrieve or load database from MySql to the Android app? So far most of them includes JSON etc. Is it a must to involve JSON? Is there any alternative way?

I am able to post data to the database. I would like to know if I can view the table of the database or any info from the database from the Android app directly.

My aim is to view all directory and files available in the web server. User can enter the directory or file while browsing. It would be good if it is listed in ListView etc?

  • 写回答

2条回答 默认 最新

  • dongwu8653 2011-11-25 21:39
    关注

    I have seen forum posts of undocumented MySQL JDBC drivers created for test and academic purposes. Just a quick search on google for "Android JDBC MySQL" will get you to some of these. However, you would not typically want to connect directly to a database over the web on your mobile device, bad idea (for a host of reasons). Instead you might look at creating an interface for whatever data it is you want to access and exposing it as a service (SOAP, REST, anything else). Then you can use a variety of plain Java APIs to get/ put/update/delete/whatever your data. What you want is more like the Google Data APIs, for your own stuff, rather than trying to include all sorts of JDBC overhead on a phone (keep all of that on the server, and use it like you normally would).

    评论

报告相同问题?

悬赏问题

  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 路易威登官网 里边的参数逆向
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏
  • ¥15 gg加速器加速游戏时,提示不是x86架构
  • ¥15 python按要求编写程序
  • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
  • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。