开发者

Android - How to read contents of a webpage

I'm writing an Android app that uses zxing (barcode scanner). I've gotten to the point where the barcode scanner returns a product id (example: 798709102087), and I put that in a url (example: http://www.google.com/products?q=798709102087).

What I would like to do is once I construct that url string... I'd display the first result returned by that url.

Here's the flow: 1) They turn on my app 2) They select barcode scan 3) They scan the product (which automagically sends them back to the main page of my app) 4) The user 开发者_如何转开发is then shown the first product (if any) found on the google product site.

I don't need you guys to write code for me, I just need suggestions on how I should go about doing this! I'm relatively new to Android apps, so be gentle!

Thanks for your help guys, and let me know if I can clarify anything.


If you have the content of the search, you must parse it(StackOverFlow question) to get the first url product.

Once you have this URL you can use the WebView with loadURL

Byes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜