Uniten Student Info Android Application, behind the scene

If I’m not mistaken, my last time coding Android application ( in java) was in April 2013. I was attending the Android workshop in November last year but wasn’t doing the coding, only copy and pasting the code. I Almost forgotten all the steps, the hardest part for me always on designing user interfaces. The coding which are using java fairly straightforward except the NTLM authentication part, java and apache web client currently isn’t supporting this authentication by default. I took almost 2 or 3 days to find the solution to this authentication and I found jcifs library from samba.org to do the stuff.

uniten student info promo

This system or application is not basically affiliated by Uniten, I mean by that, Uniten does not hire me or giving access to their system for acquiring students data.

So how the app get all the data? The concept is when you enter ID and password, this app will try to fetch your biodata from http://info.uniten.edu.my/info/Ticketing.ASP?WCI=Biodata . The fetching algorithm of course require usage of regular expressions, I will explain later. Fetching the html contents from that URL also is not simple as normal URLs as it’s access protected by NTLMV2,  the app will authenticate using the credentials provided by you. After successful of authentication, all the data are saved to the SQLite database and gotcha you are logged in.

Methods of Obtaining Data

One of the disadvantage of using Regular Expressions (RegEx) rather than API is I need to update the regex every time Uniten updates the web, I hope that Uniten can provide API for developers in future, hope so.

So what is actually the Regex? I’m not going to explain all the concept in this post but you can look at the screenshot below

regex

That’s how the app captures all information from HTML codes behind the scene. I think I only have one difficulty to construct the expressions when to fetch the time table and split it according to day, time etc.

timetable

The fetching becomes harder as the HTML codes have errors, if you view the source, you know the <TR> tags are not closed at the end of rows that hold  subject and location details.

Security and Privacy

Some of you might concern about security or privacy of this application. From the security perspectives, the app is using NTLMV2 authentication which is the same method your internet browser used when authenticate you to the uniten info website. The app will store your information after successful authentication ONLY IN YOUR DEVICE, even me as the developer is absolutely have no control of your information or password when you are installed and using the app.

You may evaluate it by few methods, such as view all the outgoing connections.