Skip to main content
The cover image for "ForumMate: My return to Android app development"

ForumMate: My return to Android app development

Sidebar

I worked as an Android developer just over two years ago, creating native apps for clients using Java and Kotlin. During that time, Kotlin was gaining prominence and had just been made official by Google. Google also introduced Architecture Components that year, later renamed to JetPack. Since then, the Android ecosystem has changed significantly, with Kotlin and JetPack gaining significant maturity and development. Out with Realm, Activities, and Model-View-Presenter (MVP), in with Room, fragment-based architecture, and MVVM. [Data-binding](/2020/05/06/android-complete-recyclerview-data-binding/) and MVVM are pretty awesome and breathe a whole new life into Android app development.

I worked as an Android developer just over two years ago, creating native apps for clients using Java and Kotlin. During that time, Kotlin was gaining prominence and had just been made official by Google. Google also introduced Architecture Components that year, later renamed to JetPack. Since then, the Android ecosystem has changed significantly, with Kotlin and JetPack gaining significant maturity and development. Out with Realm, Activities, and Model-View-Presenter (MVP), in with Room, fragment-based architecture, and MVVM. Data-binding and MVVM are pretty awesome and breathe a whole new life into Android app development.

What is ForumMate? #

In order to get back up to speed with Android development, I needed a project to work on. I decided to make a forum/bulletin board aggregator app, which uses HTML parsing to get data from legacy forum websites and display it using a nice user interface.

ForumMate allows the user to log into a phpBB forum using a WebView, where the app captures the session cookies. The user can either select a forum from a list fetched using a REST API, or log into any forum by navigating to it on Google search.

These session cookies are stored and used in future HTTP requests, where they are parsed using JSoup. Results are stored in a Room database, with the interface subscribing to LiveData.

Screenshots #

The user interface is a still a work in progress, but it works.

List of available forum topics
List of available forum topics
Unread Topics
Unread Topics
Posting a comment to a thread
Posting a comment to a thread
Accounts
Accounts

Architecture and Technical information #

The app is architectured using MVVM, with two-way data-binding, dependency injection, and Navigation components.

The code has 5 main zones: Views (ie: fragments), ViewModels, Repositories, Database (ie: Room), and the Backend. The backend consists of interfaces with an implementation per forum software, used to interact with forums. The ForumLoginStrategy interface is used to detect the forum software using the Strategy Pattern and obtain access information.

Diagram showing the zones used by the login flow. Repositories are also used to access the database.
Diagram showing the zones used by the login flow. Repositories are also used to access the database.

Why I haven’t published it on Google Play #

I’ve decided not to publish ForumMate for two reasons:

  • Crawling raises legal concerns: Website owners are unlikely to like their sites being access by automated tools. There’s also a risk of it being considered copyright infringement, I’d have to look into this.
  • The difficulty of crawling takes too much focus: Forum software varies massively, with different themes and backing software, which makes the parsing software quite brittle. Fixing this would take too much focus away from app development and places it on HTML parsing, which is not what I want to achieve with this project.

I’ve achieved what I intended to do with ForumMate - I’ve gotten back up to speed with Android development.

Comments

Leave comment

Shown publicly next to your comment. Leave blank to show as "Anonymous".
Optional, to notify you if rubenwardy replies. Not shown publicly.
Max 1800 characters. You may use plain text, HTML, or Markdown.