mirror of
git://f0xx.org/android_cast
synced 2026-07-29 07:58:10 +03:00
44 lines
1.4 KiB
Markdown
44 lines
1.4 KiB
Markdown
# Commercial features (developer-gated)
|
|
|
|
Ads, in-app purchases, and Play Store helpers are **disabled for normal users**. Turn them on only in **Developer settings** while testing monetization.
|
|
|
|
---
|
|
|
|
---
|
|
|
|
## Table of contents
|
|
|
|
<!-- toc -->
|
|
- [Developer toggles](#developer-toggles)
|
|
- [Before production](#before-production)
|
|
- [Code map](#code-map)
|
|
<!-- /toc -->
|
|
|
|
**Documentation index:** [README.md](README.md)
|
|
|
|
---
|
|
|
|
## Developer toggles
|
|
|
|
| Setting | Effect |
|
|
|---------|--------|
|
|
| Enable in-app ads | Initializes `InAppAdCoordinator` (placeholder UI; AdMob not linked yet) |
|
|
| Enable in-app purchases | Connects Google Play Billing; placeholder SKU `androidcast_premium` |
|
|
| Enable Play Store integration | Allows listing intent + in-app review API |
|
|
|
|
Changing a toggle calls `CommercialFeatures.refreshFromPreferences()`.
|
|
|
|
## Before production
|
|
|
|
1. Create app in **Google Play Console** and add in-app products matching `InAppPurchaseCoordinator.SKU_PREMIUM`.
|
|
2. Add **AdMob** App ID to `AndroidManifest.xml` and replace `InAppAdCoordinator` placeholder with real ad units.
|
|
3. Privacy policy + ads declaration if using ads.
|
|
4. Remove or hide developer toggles in release builds (optional `BuildConfig.DEBUG` guard).
|
|
|
|
## Code map
|
|
|
|
- `com.foxx.androidcast.commercial.CommercialFeatures`
|
|
- `InAppPurchaseCoordinator` — Billing Client 7.x
|
|
- `InAppAdCoordinator` — stub
|
|
- `PlayStoreIntegration` — `market://` + Play In-App Review
|