Skip to content

jumanto14/intenthelper

Repository files navigation

IntentHelper 🚀

Simple, clean, and production-ready Intent helper library for Android (Kotlin).
Designed for beginners, safe for real production apps, and easy to integrate.


✨ Features

  • 🚀 DSL-based Activity starter
  • 🧩 Pair-based extras builder
  • 🔐 Safe get API (API 33+ compatible)
  • 📦 Parcelable support
  • 🌍 System Intent helper (Browser, Dial, Email, Share)
  • 🧼 Clean internal engine
  • 📦 No external dependencies
  • 🔒 No reflection
  • 🧩 No Proguard configuration required

📦 Installation

Step 1: Add JitPack repository

settings.gradle.kts

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

Step 2: Add dependency

dependencies {
    implementation("com.github.jumanto14:intenthelper:v1.0.0")
}

🚀 Usage

1️⃣ Start Activity (DSL Style)

IntentHelper.start<SecondActivity>(this) {
    string("name", "Jumanto")
    int("age", 30)
}

2️⃣ Start & Finish Current

IntentHelper.start<HomeActivity>(
    context = this,
    finishCurrent = true
)

3️⃣ Start Clear Task

IntentHelper.startClearTask<LoginActivity>(this)

4️⃣ Start With Pairs (Alternative Builder)

IntentHelper.startWithPairs<SecondActivity>(
    context = this,
    "name" to "Jumanto",
    "age" to 30,
    "isPremium" to true
)

🔐 Safe Get (API 33 Compatible)

Get String / Primitive

val name = intent.getExtraSafe("name", "")
val age = intent.getExtraSafe("age", 0)

Get Parcelable

val user: User? = intent.getParcelableSafe("user")

🧩 Parcelable DSL

IntentHelper.start<SecondActivity>(this) {
    parcelable("user", userObject)
}

🌍 System Intent Helper

🌐 Open Browser

IntentSystem.openBrowser(this, "https://google.com")

📞 Dial Phone

IntentSystem.dial(this, "08123456789")

📧 Send Email

IntentSystem.email(
    context = this,
    to = "support@email.com",
    subject = "Hello",
    body = "Message here"
)

📤 Share Text

IntentSystem.shareText(this, "Hello World")

🗂 Library Structure

intenthelper/
├── IntentExtensions.kt
├── IntentHelper.kt
└── IntentSystem.kt
  • No Activity
  • No Permission
  • No Manifest component
  • Pure Kotlin

Production Safety

  • ✅ API 33+ compatible
  • ✅ Safe null handling
  • ✅ Prevents unsupported extra types
  • ✅ Clean internal engine
  • ✅ No reflection
  • ✅ No memory leaks
  • ✅ No Proguard rules required

📄 License

MIT License — free to use in personal and commercial projects.


👨‍💻 Author

Jumanto
Android Developer — Indonesia 🇮🇩
GitHub: https://github.com/jumanto14

About

Simple, clean, and production-ready Intent helper library for Android (Kotlin)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages