Android应用程序,如何登录网站并显示信息? [英] Android app, how to log into website and display information?

查看:94
本文介绍了Android应用程序,如何登录网站并显示信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个Android应用程序,该应用程序将登录到网站,抓取该网站以获取特定于用户的数据,然后在移动屏幕上很好地格式化该数据.

I'm trying to build an android app that will log into a website, scrape the website for data specific to the user, then format that data nicely on a mobile screen.

我注意到我有几个类似的问题,在阅读了一些文档之后,我仍然很困惑应该如何去做.

I've noticed that there are several similar questions to my own, and after reading some of the documentation, I am still very confused as to how I should go about this.

这就是我所知道的
我要登录的站点利用asp.net,login.aspx使用POST作为登录表单.
该网站没有API
也没有单一登录

Here's what I know
The site that I want to log into utilizes asp.net and the login.aspx uses POST for the login form.
There is no API for this website
There is also no single sign on

非常是Android的新手,并且充其量只是JAVA的新手.有人可以请我帮助我完成编写此应用程序所需的研究工作吗?我觉得我最需要连接到网站并获取数据的帮助,我将能够弄清楚布局和格式化自己.

I'm very new to Android and a novice JAVA programmer at best. Will someone please help me carve the path of research that I need to do in order to write this app? I feel that I mostly need help with connecting to the website and getting the data, I'll be able to figure out the layouts and formatting myself.

我非常愿意研究和阅读必要的内容,但我希望将任何不相关的信息最小化,这些信息最终会导致更多的混乱.

I am more than willing to research and read whatever is necessary, but I would like to minimize any irrelevant information that would ultimately lead to more confusion.

预先感谢您的帮助

推荐答案

要访问该网站,您需要了解的只是HTTP.目标网站是用PHP还是ASP等构建的都没有关系.您只关心如何通过HTTP与网站进行通信,而HTTP与网站使用的技术无关.您可以尝试使用Wikipedia来描述这些方法.

For the purpose of accessing the website all you need to know about is HTTP. It doesn't matter whether your target website is built with PHP or ASP etc. As you're only concern is how to communicate with the website through HTTP which is independent of technology used by the website. You can try wikipedia for descriptions of these methods.

可能值得阅读有关如何使用Java的Java URL教程类.关于提取数据本身,您可能想在解析器上阅读.此链接可能会给你一些初步的想法.

It might be worthwhile reading the Java URL tutorials for how to use Java classes. As regards extracting the data itself you might want to read up on Parsers. This link might give you some first ideas.

这篇关于Android应用程序,如何登录网站并显示信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆