Skip to content

Repository files navigation

Blogger

Platform Language Architecture Database Images Min SDK Target SDK License: MIT

An offline-first Android blog drafting and publishing suite featuring SQLite persistence, internal image storage isolation, FileProvider social sharing, and multi-select bulk operations.


πŸ“– Overview

Blogger is a distraction-free, offline-first mobile blogging studio and markdown/article drafting companion for Android. Designed for writers, journalists, and content creators who need to compose, archive, and refine articles on the move without dependence on cloud backends or active internet connections.

The application couples a native SQLite database architecture with the Android Jetpack MVVM pattern. It features an isolated media pipeline that saves selected cover photos to private internal storage, secure system-wide article sharing via FileProvider, real-time title search filtering, and contextual multi-select deletion modes.

Key Highlights

  • 100% Offline Article Drafting: Create, edit, and organize posts with zero server requirements.
  • Private Media Isolation: Imported gallery images are safely copied into private app internal storage, protecting against broken external image URIs.
  • Rich Social Sharing: Dispatches formatted post text and attached image media via Android's native share sheet using secure FileProvider URI grants.
  • Multi-Select & Bulk Actions: Long-press to activate multi-select mode and batch delete archived drafts.

πŸ—οΈ Architecture & Component Flow

flowchart TD
    subgraph UI_Layer [Presentation & Activity Layer]
        MainActivity[MainActivity - Article Archive & Search]
        AddEditActivity[AddEditActivity - Compose & Edit]
        ViewPostActivity[ViewPostActivity - Reader Screen]
        Adapter[BlogAdapter - Multi-Select & Search Filter]
    end

    subgraph ViewModel_Layer [State & ViewModel Layer]
        VM[BlogViewModel]
    end

    subgraph Data_Layer [Repository & Local Storage]
        Repo[BlogRepository]
        DBHelper[DatabaseHelper - SQLiteOpenHelper]
        SQLite[(SQLite Database\nblog table)]
    end

    subgraph Media_Storage [Image Pipeline & Sharing]
        ImageUtils[ImageUtils]
        InternalStorage[(App-Private Internal Storage)]
        FileProvider[AndroidX FileProvider]
        ShareSheet[Android Share Sheet]
    end

    MainActivity --> VM
    AddEditActivity --> VM
    ViewPostActivity --> VM
    MainActivity --> Adapter

    VM --> Repo
    Repo --> DBHelper
    DBHelper <--> SQLite

    AddEditActivity --> ImageUtils
    ImageUtils --> InternalStorage
    ViewPostActivity --> FileProvider
    FileProvider --> ShareSheet
Loading

✨ Core Features

✍️ Distraction-Free Article Editor

  • Compose articles with custom title, expandable body content, formatted date-time stamps, and custom cover images.
  • Full editing and updating capabilities for previously drafted blog entries.

πŸ–ΌοΈ Private Media Sandboxing

  • Automatically copies selected gallery photos to internal sandbox storage (getFilesDir()), preventing media links from breaking if original files are moved or deleted.
  • Image loading optimized via Glide with rounded corner transformations and placeholder fallbacks.

πŸ“€ Secure Article Sharing (FileProvider)

  • Broadcasts full article text alongside the attached image file to third-party social apps, messaging platforms, and note repositories using FileProvider content URIs.

πŸ” Real-Time Search & Multi-Select Batch Delete

  • Built-in SearchView filters the article archive in real time by title matches.
  • Long-press contextual multi-selection enabling one-tap bulk deletion of multiple drafts.

πŸ“± Key Screens & UI Components

Screen / Component Class Description
Archive Feed MainActivity Displays articles ordered newest first, real-time search bar, Add FAB, and multi-delete action bar.
Post Composer AddEditActivity Editor for drafting new posts, attaching photos from gallery, and updating existing records.
Reader View ViewPostActivity Full-screen reading mode displaying title, timestamp, cover photo, content body, and share button.
List Adapter BlogAdapter RecyclerView adapter supporting selection tracking, search filtering, and Glide image binding.
Database Helper DatabaseHelper SQLiteOpenHelper managing schema creation and migrations for blog_app.db.

πŸ› οΈ Technical Stack Matrix

Layer / Concern Technology / Library Version / Details
Platform Android OS minSdk 28 (Android 9.0) / targetSdk 35 (Android 15) / compileSdk 35
Language Java Java 11
Architecture MVVM + Repository Pattern Android Jetpack Lifecycle (ViewModel, LiveData)
Database Native Android SQLiteOpenHelper Raw SQLite database engine (blog_app.db)
Image Loading Glide 4.16.0 image loading with annotation processor
File Sharing androidx.core.content.FileProvider Secure temporary URI granting for social sharing
UI Components AndroidX & Material Design RecyclerView, CardView, FloatingActionButton, SearchView
Build System Gradle Kotlin DSL (build.gradle.kts) AGP 8.7+

πŸ“‚ Project Structure

Blogger/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ java/com/example/securebloggingapp/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ adapter/
β”‚   β”‚   β”‚   β”‚   β”‚   └── BlogAdapter.java           # Multi-select RecyclerView adapter
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ db/
β”‚   β”‚   β”‚   β”‚   β”‚   └── DatabaseHelper.java        # SQLiteOpenHelper schema & table definition
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ model/
β”‚   β”‚   β”‚   β”‚   β”‚   └── BlogPost.java              # Data model representing blog posts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository/
β”‚   β”‚   β”‚   β”‚   β”‚   └── BlogRepository.java        # Repository executing SQLite queries
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”‚   β”‚   └── ImageUtils.java            # Bitmap & internal storage copy utility
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ view/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MainActivity.java          # Archive feed & search controller
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AddEditActivity.java       # Article composer & photo picker
β”‚   β”‚   β”‚   β”‚   β”‚   └── ViewPostActivity.java      # Article reader & social share launcher
β”‚   β”‚   β”‚   β”‚   └── viewmodel/
β”‚   β”‚   β”‚   β”‚       └── BlogViewModel.java         # Lifecycle ViewModel
β”‚   β”‚   β”‚   β”œβ”€β”€ res/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ activity_main.xml          # Main archive feed layout
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ activity_add_edit.xml      # Composer activity layout
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ activity_view_post.xml     # Reader screen layout
β”‚   β”‚   β”‚   β”‚   β”‚   └── item_blog_post.xml         # Blog card item layout
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ xml/
β”‚   β”‚   β”‚   β”‚   β”‚   └── file_paths.xml             # FileProvider shared paths configuration
β”‚   β”‚   β”‚   β”‚   └── values/                        # Dimensions, strings, and themes
β”‚   β”‚   β”‚   └── AndroidManifest.xml
β”‚   β”œβ”€β”€ build.gradle.kts
β”‚   └── proguard-rules.pro
β”œβ”€β”€ gradle/
β”‚   └── libs.versions.toml
β”œβ”€β”€ build.gradle.kts
β”œβ”€β”€ LICENSE
└── README.md

πŸš€ Getting Started

Prerequisites

  • Android Studio (Ladybug 2024.2+ or Hedgehog+).
  • JDK 11 or JDK 17.
  • Android device or Emulator running API 28 (Android 9.0) or higher.

Installation & Build

  1. Clone the repository:

    git clone https://github.com/shayann07/Blogger.git
    cd Blogger
  2. Open in Android Studio:

    • Open the directory in Android Studio and let Gradle sync dependencies.
  3. Build the APK:

    ./gradlew assembleDebug
  4. Install & Run:

    ./gradlew installDebug

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for complete details.

Copyright (c) 2026 shayann07

About

Offline Android blog drafting & article publishing suite with SQLite persistence, internal media sandboxing, and FileProvider social sharing.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages