Skip to content

kazmi-dev/GoogleBilling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧾 GoogleBilling β€” With Hilt + Without Hilt

A reusable, clean, and modern implementation of Google Play Billing using Kotlin, Dagger Hilt, and coroutines.
Supports one-time purchases (INAPP) and subscriptions (SUBS) with proper handling for purchase states, errors, and acknowledgment.


πŸ“¦ Features

  • βœ… Two-way billing package -> DI & Object
  • βœ… Supports in-app purchases and subscriptions
  • βœ… Handles acknowledgment, pending, and already purchased states
  • βœ… Uses BillingClient with proper lifecycle handling
  • βœ… Coroutine-powered product querying
  • βœ… Plug-and-play State Flows (products, billingEvents)
  • βœ… Built with Dagger Hilt for dependency injection
  • βœ… Support MVVM Architecture (viewModel & repository)
  • βœ… Support billing through Object

πŸ“š Prerequisites

  • βœ… Billing Library
  • βœ… Dependency Injection (Dagger/Hilt)
  • βœ… NO Dependency Injection (Dagger/Hilt) with Util as an Object
  • βœ… Copy Paste package and use

With Di

Initialize viewModel to start billing connection automatically or inject billing repositoy in your Application class to start billing connection automatically and fetch, restore products automatically.

With Object

Initialize Billing util with initBillingClient() fuction in your application class to start billing connection, fetch and restore product purchase states.

About

Simple billing v8.0.0 implementation for android kotlin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages