dongsui0929 2013-04-04 14:28
浏览 39
已采纳

使用php后端在Android应用中显示数据[关闭]

I have question about structuring applications. I'm making, for example, a Twitter-like app. This application must make a query on a url (it's done by asynctask) and gets a reply (it can be Json, serialized array, or even html).

In next step app outputs data. For example, latest news. I don't know in which ways it can be done. I tried to make it with html data from the backend and viewing it through the web-view, then I added click listener on links. With this I can control the app and navigate. After that I turned on JavaScript in web-view and can control the DOM. In the web-view, drawing images is easier.

Am I going in right direction or do I need to use something like list-view to output? And what future problems may there be using this?

  • 写回答

1条回答 默认 最新

  • dongyu2764 2013-04-04 14:37
    关注

    Ok, your question is very confused, but I'll try to ask. As you sayed you have 2 alternatives, one is to built your interface natively and retrieve the data from a Web Service via an asyncTask, the other is to use a WebView.

    Both approach are valid, but think that is you use a WebView you are building an non-native application (in fact is an hybrid application) so you need to simulate the native behaviour (this can cause you problems in the future)

    I prefer to use a WS and build the interface with native widgets, for comunication you can use JSON.

    If you prefer to use a WebView, I recommend you to use a framework like Sencha or phonegap

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么