Open ylogx opened 9 years ago
I think we should use some html parser (may be jsoup). In most of the forms, there would be two fields, one for email and other for password and then one input field type submit. So we can extract those input fields and get the name of the fields using parser and can also check form submit type method used (get or post). May be something like this : http://pastebin.com/4zEYcFsy . Although I have not tested it and it is not complete.
Looks like a good start. I think you have the push access now. Let's start doing this in a separate branch and see where we reach.
I don't think we can make it global. Although login is possible but still we can't find out the logout URL by any means. Instead rating of app would decrease and users will give negative comments too that it does not works fine and blah blah.....!!
Login is what we need to worry about right now. Login is possible. Definitely possible. If google can find and show Sign in notif, then it is definitely possible. AFA logout is concerned we can always disable that using seperate layouts (based on hasLogoutCapability function or something) etc. PS: Rating is not the driving force. The main motive is to build the product that we started with in the first place. We don't have commercial goals from this application, so ratings don't matter. Anyway if the final product is useful, positive response will follow eventually
Hey @Ashish-Bansal I just pushed 862ab22. I can't make this tree work man. I tried and login and logout gives no response. Can you please look into it and debug it further.
Well I tried it today morning but didn't got the much time to test it. I was able to log in using it. But I tried log out but it didn't worked. I thought there must be some other issue with it as I didn't changed anything regarding that. But now it struck my mind. If you are already logged in and you press up log in, this changes the BASE_URL to http://www.google.co.in/........ and after that logout would not work as BASE_URL+ "?cmd=logout" is not logout url. That's why logout is not working. While testing it on home network, I just figured out that If user presses login multiple times, it is not gonna send requests multiple times. Only one thread will run and all other would be in queue and if first one does not finishes up(possible!!) or lets consider other one in which first one request finishes successfully(user login is successful) but next request is not gonna finish up because regex match would fail and stuck up there, then nothing is gonna work until user restarts it. We need something else to kill that thread or some better way.
Here is a recent logcat at this tree 5569357 http://fpaste.org/150209/
Okay So, I found two issues in it.
Although I have used m_ping.cancel(true); but I don't know where I am making mistake.
This is one of the high priority task still pending. Due to this the app can't be useful outside PU@Campus and hence is blocking release anywhere outside. The chief goal is to get the url dynamically instead of hard-coded string (http:172....).
There are two type of cases where this happens . . .
CASE 1: Redirections 302
CASE 2: Local server serves page instead of google.com which redirects (UIET, PU@Campus sometimes does this)