dongpan3001 2014-12-10 09:34
浏览 25

我的网络服务器和Android通信

I have a web page that is a demo for a web shop, which I will implement later. In the web shop you can select an item to buy it. In my demo scenario, I just want to send the info about the cost of the item to my Android upon button click in the web shop.

STEP-BY-STEP explanation:

  1. openWebShop (in Android app you click a button and it calls this method to open URI)
  2. Web Shop opens with items that you can buy.
  3. Select an item from the list
  4. onItemClick send the prize value and name of item selected to the Android device and store it in a String
  5. Close WebShop -> display your App again with a New Intent / Fragment displaying the chosen Item name and Prize tag.

I also want to upload some files to the web shop. There are some questions here on Stack Overflow on how to do that, but for the time being, I won't tackle that problem yet.

QUESTIONS:

  • Can I use GCM for my idea ?
  • Do I need to create a Web page apart from Android coding or can you style your web shop inside Android coding? (no experience with web development)
  • Do I need to implement a onItemSelected inside PHP or is it done somehow else?

SOME INFO I GOT:

What I have learned so far is that I could use HTTP request to download a file from Web Server. I only saw examples on how to download XML files, but I assume that is the same for any file type. But I am not sure whether if this is the best solution for my case. I noticed GCM, but have trouble with PHP, since I have no experience with it - does it have some sort of onClick method ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向