Mobireg App, Android client for students and parents

A little bit of background - why?

In the 2017 I became a student of Technical School: Upper-Secondary Schools of Communications in Cracow. The school used to use Mobireg system as its grade book. While having marks in online system rather then in a paper one is much useful, Mobireg is quite an old pice of technology written in early 2000s.

Screenshot of the home page, It doesn't look very bad, but quite outdated
Screenshot of the home page, It doesn't look very bad, but quite outdated

The website might have been modern some time ago, but time has changed. Most people use phones and other mobile devices to access the web and Mobireg has no mobile page unfortunately.

So, at least there is a mobile app, right? Technically there was one, but that's about it.

Screenshot of the home page, It doesn't look very bad, but quite outdated
It was build for very old Android, and looks very out of place

Using the app we'll quickly notice a lack of many features you could expect from app like this. For example:

  • Notifications
  • Showing calculated average scores
  • Sending messages to teachers
  • Timetable widget
  • Dark theme

Having a some experience in creating Android app and much passion for that I decided to try to make an app that suites me better then the official one with more features one can want.

Getting access to data

The easiest and best way to access data would be using the official API with docs. However, we can only dream about such goods. Companies which offer grade book solutions are trying really hard to be the most closed at least easy platform to use for third party coders.

There are two options remaining: web scraping and reverse engineering of the existing app.

At first I tried the first one - created Android WebView, simulated button clicks and parse HTML. God thanks I knew about regex at that time. I was quite successfully with reading marks data, though it worked unreliably and had quite a few limitations. Not all information were available in HTML by default. For data such as extended description I used to fetch additional HTML for each mark. That was really slow… I needed a better approach…

Frankly there is much better way to do what. Let's check how the official app gets this data. To achieve that I used Packet Capture and very quickly do discover the API endpoint and what parameters to send

Screenshot of the app capturing HTTP traffic. We can see that the official app captures data that is unnecessarily and without user permission
Screenshot of the app capturing HTTP traffic. We can see that the official app captures data that is unnecessarily and without user permission

It looks like there is only one API endpoint, returning JSON file which is a kind of database dump. I need to send login, MD5 hashed password and some additional parameters such as lmt which is used by the backend to determine what changes in data to send us. Entities returned by API are grouped by type and have "action" field which may be equal to "D" in which case it means this entity was deleted.

I have to admit the way it was designed is quite smart and easy to use for apps designed to run offline.

First public release

My app was test by a few friends of mine. Thanks to them I was able to create MVP and share it to the public with confidence it would work… Obviously I didn't work for some new users 😂

I asked my friend p0358 if he could use his bot to promote newly released app. The bot had been used my hundreds of students in my school so I was great to quickly get users… and instant bug reports as well.

I asked my friend <a href="https://github.com/p0358" rel=noreferrer target=_blank>p0358</a> if he could use his bot to promote newly released app. The bot had been used my hundreds of students in my school so I was great to quickly get users… and instant bug reports as well.
The advertisement bot's users received. It presents screenshots of early version

The first problem my app encounter when released to the wild was failing to sign users in. Yeah, failing to do the first thing they attempted was quite disappointing, but I had no chance to catch that. It was related to certain username format that some students had. It proves the necessity to test among very diverse audience, especially when having no API docs.

The app had also problems with parent accounts if there were multiple children in the same school. Very niche case, but required quite o lot of checks on my end. Thanks to the community many of such problems were quickly discovered and fixed.

Generally speaking the first impressions were very positive despite sign in problems. I got a bunch of users, received many thanks as well as feature suggestions.

Further development

MVP I released was already better then the official app, but I wanted to make it even better by adding more stuff users want.

The the start the functions were more important then the design. Since the app was functional I could improve the look and feel. One of the key things were introduction of the Easter Egg - app would offend the Mobireg, by comparing it to you "hopeless" grades.

The the start the functions were more important then the design. Since the app was functional I could improve the look and feel. One of the key things were introduction of the Easter Egg - app would offend the Mobireg, by comparing it to you "hopeless" grades.
The easter egg at the welcome page. The adjective changes for a random "hopeless" synonym.

There were many UI iterations for key screens such as mark details. I wanted to get best user experience with conjunction to modern design. Settled on BottomSheet which was ideal for that. Can't remember where I get an inspiration from, might be Google Photos?

The the start the functions were more important then the design. Since the app was functional I could improve the look and feel. One of the key things were introduction of the Easter Egg - app would offend the Mobireg, by comparing it to you "hopeless" grades.
Different iterations of mark details screen

I also added a few features people wanted such as average calculator that you can simulate getting grades to check if you're still passing a subject. That was one of the greatest additions to the app.

The the start the functions were more important then the design. Since the app was functional I could improve the look and feel. One of the key things were introduction of the Easter Egg - app would offend the Mobireg, by comparing it to you "hopeless" grades.
Amount of sections grew showing rapid development.

Support from the cloud - VPS

One of the problems, that I couldn't easily solve, was lack of instant (push) notifications. Mobireg doesn't provide you with a way to get notified when somethings changes. You need to ask the server - such method is called "pulling"

The alternative way is "pushing" changes to the client by the server. Waay better solution thanks to it beeing more effective with phone resources - the app doesn't need to live and ask periodically the server for changes.

Mobireg server Mobishit app periodic syncing with API

The first app architecture looked very simple. Just syncing with the API endpoint. To get push notifications I had to build my architecture:

Mobireg server Mobishit app periodic syncing with API Firebase My server Sending notifications Waking up device periodic checking additional features via scraping HTML

Keep in mind that using the components at the bottom is optional. User has control and can opt out of it. App can work using the first architecture, but with limited functionality. This approach is nice for more, because it allows me to quit hosting (which costs some money) at anytime and clients will fallback to using the old architecture automatically.

This way I also implemented getting exams and comparisons data as well as sending messages to teachers. Despite the official API lacking such features. I had to create my own API in Python that simulates the web browser to allow for such magic

The role of community and what I learned

There would be no Mobishit, at least in this form, if not the community. What started as a small plugin in my personal app with bus schedules transformed into huge project loved by many students.

Such achievements required community and therefore I now believe that whatever I code I need to talk and listen to user feedback. This is the most important factor.

I remember getting a message from one of my users asking for a new functionality: ability to change name of any subject or teacher. At first I thought it was a stupid idea, why would anyone want to do this? But since it simple to implement I did it the same day. After adding this featured I realized it was soooo awesome addition I started adding nicknames for all my teachers. My friends were also pleased by such addition. It was so much fun 🤣 - thanks to the community.

While creating this project I also appreciated GIT version control system. Not only I could experiment on separate branch - it also keeps my entire history. That saved me potentially hours of debugging. Once I had weird bug, only in release build, not noticeable at first, but totally breaking key feature of the app - it failed to synchronize. It worked in previous release despite me changing nothing about syncing… Thanks to GIT I quickly realized that the problem was in an updated dependency that broke syncing.

The other skill I gained is SQL. This project utilized both SQLite and MySql. I enjoy writing raw SQL instead of using ORM queries, since writing anything more complicated results in too much hacking. Mobishit was the app I could learn a lot.

Such achievements required <b>community</b> and therefore I now believe that whatever I code I need to talk and listen to user feedback. This is the most important factor.
Typical SQL query I wrote. It gets existing marks to be imported into average calculator, using Room library, Kotlin

What next?

After two years of studying at ZSŁ some people started to claim that Mobireg would be replaced by Librus - competition do Mobireg. That would make Mobishit completely useless.

And it has happened. Mobireg got purchased by Librus taking all schools which used their services.

But every school? Actually no! For some reason Mobireg stayed for musical schools and they advertise it as a best grade book for musical schools. They've even changed logo to reflect that 😂

While this move has reduced popularity of my application it haven't got rid of it completely. There still are some users. I must admit I was very surprise to receive email about GitHub Issue from one of the users. I was quick to solve the issue for him as It does my heart when someone still uses my products even though I don't support it for years 😊

Thanks for reading
Any questions, suggestions, opinion? Feel free to contact me