mdnaimurrahman.com
OffLearn GK
Date
Jan 2021
Category
Android
Source Code
Preview
N/A

OffLearn GK — Offline Learning General Knowledge

An Android application for learning General Knowledge (GK), primarily targeting Bengali-speaking users. The app delivers categorized GK content fully offline after the initial data sync, making it ideal for exam preparation and self-study without a constant internet connection.

Note: This project was originally developed in 2021 when I was in grade 10 and is being hosted on GitHub in 2026.


Features

  • Offline-First — Content is fetched once from a remote source and stored locally in an SQLite database. All subsequent reads are fully offline.
  • GK Categories — Browse topics organized into categories including:
    • Bangladesh Affairs (বাংলাদেশ বিষয়াবলি)
    • International Affairs (আন্তর্জাতিক বিষয়াবলি)
    • Science & ICT (বিজ্ঞান ও ICT)
    • Sports (খেলাধূলা)
    • Language & Literature (ভাষা ও সাহিত্য)
  • Country Info — Detailed country-wise information (capital, currency, language, religion) with real-time search and multi-field filtering.
  • Topic Search — Search across all GK content by keyword.
  • Last Read — Resume from the last article you were reading.
  • Font Selection — Switch between Bangla fonts: Default (BalooDa), Solaiman Lipi (Kalpurush), and Siyam Rupali.
  • Auto Data Update — Checks a GitHub-hosted JSON data source on startup and updates local content silently when a newer version is available.
  • Built-in Browser — WebView-based in-app browser for quick internet searches.
  • Custom Crash Handler — Catches unhandled exceptions and displays a friendly crash screen instead of a force-close dialog.

Architecture

The project follows MVVM (Model–View–ViewModel) architecture with a Repository pattern.

app/
└── src/main/java/theknowledgekingdom/offlearngk/
    ├── core/           # Base classes, custom widgets, crash handler, annotations
    ├── data/
    │   ├── local/      # SQLite database (DatabaseHelper, DatabaseQuery, Preferences)
    │   ├── model/      # Data models: Category, Content, Country
    │   └── repository/ # DataRepository, HomeDataRepository (network + DB logic)
    ├── executor/       # Background thread executors
    ├── ui/
    │   ├── activity/   # MainActivity, SecondaryActivity, WebViewActivity
    │   ├── adapter/    # RecyclerView / ListView adapters
    │   ├── fragment/   # Home, ContentView, ContentsOfCategory, CountryInfo, Search, AboutMe
    │   └── viewmodel/  # ViewModel classes per screen
    └── util/           # Utility helpers (Utils, ViewUtils, VolleyUtils)

Tech Stack

ComponentLibrary / Version
LanguageJava
Min SDKAPI 19 (Android 4.4 KitKat)
Target SDKAPI 30 (Android 11)
UIAndroid Support Library (AppCompat, Design, CardView)
NetworkingVolley 1.2.0
Image LoadingGlide 4.9.0
JSON ParsingGson 2.10.1
Local StorageSQLite (via custom DatabaseHelper)
ArchitectureMVVM + LiveData + Repository
Data SourceGitHub-hosted JSON (LYT-Innovations/offlearn-gk-data)

Development note: This app was built using AIDE (Android IDE), a mobile Android IDE, directly on an Android device.


Getting Started

Prerequisites

  • Android Studio (Arctic Fox or later recommended)
  • Android device or emulator running API 19+
  • Internet connection for the first launch (initial data sync)

Build & Run

  1. Clone or download this repository.
  2. Open the project in Android Studio.
  3. Let Gradle sync the dependencies.
  4. Run on a device or emulator.

On first launch, the app requires an internet connection to download the GK data. All subsequent uses are fully offline.


Data Source

Content is fetched from:

https://raw.githubusercontent.com/LYT-Innovations/offlearn-gk-data/main/data-source.json

The app compares local and remote updated_at timestamps and only re-downloads when newer data is available.


Developer

Md. Naimur Rahman
Package: theknowledgekingdom.offlearngk
Version: 1.0


License

This project is provided as-is for educational and portfolio purposes.

Copyright © 2026 by Md. Naimur Rahman | All Rights Reserved