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:
- openWebShop (in Android app you click a button and it calls this method to open URI)
- Web Shop opens with items that you can buy.
- Select an item from the list
- onItemClick send the prize value and name of item selected to the Android device and store it in a String
- 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 ?