0

I am working on an Android login app for a service called Netclassroom. There are many for different schools (you can google for one), but I'd prefer not to share the one I'm working on. They're all the same. I want the app to log into the site using given credentials, but I'm running into a problem.

The problem is that it "does not use authentication" and the post request doesn't work? Is it even possible to log into a site like this? By that I mean that I want to enter credentials and get to the member page to parse.

I know this isn't the most descriptive question, but I'd really appreciate some help. Please let me know if I need to provide any additional information to help you answer. Thanks!

Mark Lyons
  • 1,218
  • 4
  • 20
  • 51
  • your question needs clarification. what's a "login app"? what's the purpose? what doesn't use auth? the app or the site? is this a mobile website or an android app? – Jeffrey Blattman Mar 31 '12 at 16:51
  • Sorry. It's a website as of now, but I'd like to make an Android app to login to the site. The site does not use authentication so I need to figure out if its even possible to login from an android app. – Mark Lyons Mar 31 '12 at 16:55
  • if the site doesn't use auth now, you need to add an auth mechanism to the site ... right? what's the point of adding auth to the android app if the user can just go directly to the site in a browser without auth? i'm still confused. – Jeffrey Blattman Mar 31 '12 at 17:11
  • It would just be more convenient than trying to access via a browser. I would like a site that would save your login and automatically log you in when you access the app, and bring up member info in a mobile-optimized way. It is not my site so I can't add anything to it. – Mark Lyons Mar 31 '12 at 17:18

1 Answers1

1

you can make an app that just starts the browser on a particular URL. here's a post that describes how to do it,

How can I open a URL in Android's web browser from my application?

further, i think you are asking if the app can circumvent the normal web page login mechanism. don't do that. there's a login on the web page for a reason. if your app gets around that, then it's decreasing the security that the folks that designed the web page put in place. the correct thing to do is to work with the folks that wrote the website. if they think what you are doing is acceptable, they should make their login cookie longer-lived, or allow the user / pass fields to be stored in the browser, etc.

again, there's absolutely no rational for making the android app less secure than the browser app.

Community
  • 1
  • 1
Jeffrey Blattman
  • 21,054
  • 8
  • 74
  • 127
  • Alright, I understand. Just to be sure, once I get the user to manually log in, can I pull the HTML from the member page to display in a more mobile-friendly way? – Mark Lyons Mar 31 '12 at 17:51
  • that's called transcoding, and it's fraught with problems, at best. there are entire companies that exist to solve that problem. what most people do is provide a mobile-friendly website with a different URL and a completely different set of assets and pages written specifically for a mobile device. – Jeffrey Blattman Mar 31 '12 at 17:53
  • So I cant do anything like take the source and parse JSON? – Mark Lyons Mar 31 '12 at 18:08
  • if it's a website, the source isn't JSON. i don't understand what you mean. JSON is used to transmit data to / from web services (among other things), it's not a representation of a user interface. – Jeffrey Blattman Mar 31 '12 at 18:11
  • I guess I'm unsure. Originally, I was able to use httpclient to get the page source and print it out. I was under the impression that from there I would be able to take that info and obtain certain data based on element IDs and everything. Is there any way to do this once the user logs in and gets to the member page? – Mark Lyons Mar 31 '12 at 18:16
  • well yes, it's software, you can do anything you want to modify the HTML source and re-display it to the user in a webview. what i'm saying is that taking a desktop HTML website and "converting" it to be mobile friendly is a large and complex task, and that's not normally how people go about presenting a mobile website to users. because of the problems with automagically converting the website, they will typically build a parallel mobile website instead of trying to convert the desktop version to a mobile version automatically. – Jeffrey Blattman Mar 31 '12 at 18:22
  • Honestly, it's just a grading site for schools. My school uses it and I've heard a few students say that they wish there were an app for it. Its just a bit annoying to check on mobile. Is there a particular name for the HTML parsing? Thanks for all your help. – Mark Lyons Mar 31 '12 at 18:28
  • if you google on the topic, you can find losts of references, for example: http://sixrevisions.com/web-development/mobile-web-design-best-practices/ – Jeffrey Blattman Mar 31 '12 at 19:30