Repository navigation
Offers‐Tab
Abdul Mueed | AM Dev edited this page Jun 29, 2026
·
3 revisions
The Offers tab allows users to view and complete CPA (Cost Per Action) offers from multiple API sources to earn rewards.
| File | Path | Purpose |
|---|---|---|
| Main Fragment | ui/offers/OffersFragment.kt |
Main offers list UI and logic |
| Detail Fragment | ui/offers/OfferDetailFragment.kt |
Individual offer detail view |
| ViewModel | ui/offers/OffersViewModel.kt |
API calls and data management |
| Adapter | ui/offers/OffersAdapter.kt |
RecyclerView adapter |
| Data Models | ui/offers/model/CpaOffer.kt |
Offer data classes |
| Main Layout | res/layout/fragment_offers.xml |
Main offers screen layout |
| Detail Layout | res/layout/fragment_offer_detail.xml |
Offer detail screen layout |
| Item Layout | res/layout/item_offer.xml |
Individual offer item layout |
| GitHub Config | https://cdn.jsdelivr.net/gh/am-abdulmueed/offers@main/offers.json |
Dynamic API config |
The Offers tab fetches from two different APIs in parallel:
- URL fetched dynamically from GitHub config
- No authentication required
- Returns ranked offers
-
Endpoint:
https://authenticateapp.online/api/v2 - Method: GET
- Auth: Bearer token in headers
-
Parameters:
ip,user_agent,max(default: 10) - Uses IP-based geo-targeting
{
"offer": "https://cpalead.com/dashboard/reports/campaigns/list.json?api_key=YOUR_API_KEY"
}data class CpaOffer(
val id: Int,
val title: String,
val description: String?,
val conversion: String?,
val device: String?,
val dailyCap: Int?,
val isFastPay: Boolean?,
val link: String,
val previewLink: String?,
val amount: Double,
val payoutCurrency: String?,
val payoutType: String?,
val countries: List<String>?,
val epc: Double?,
val creatives: OfferCreatives?,
val offerRank: Int?,
val payoutsPerCountry: Map<String, Double>?
)data class OfferCreatives(
val url: String? // Image URL for offer
)- RecyclerView with offer cards
- Swipe-to-refresh functionality
- Loading / Empty / Offline states
-
Debug Panel (visible in debug builds only)
- Live API logs with timestamps
- Copy logs to clipboard
- Debug Panel (toggleable FAB)
- Loading State (progress indicator)
- Empty State (gift icon + message)
- Offers List (RecyclerView + SwipeRefreshLayout)
- Offline Screen (shimmer effect + retry button)
Displays full offer info:
- Offer image
- Payout amount and currency
- Supported countries with flag emojis
- Device compatibility icons
- Conversion requirements
- Description
Each card shows:
- Offer image
- Offer title
- Payout amount (2 decimal places)
- Currency symbol
- Payout type label
| Code | Label |
|---|---|
| CPI | Install |
| CPE | Action |
| CPR | Registration |
OffersFragment.onCreate()
└─ ViewModel.fetchOffers()
└─ Check cache
├─ Cache fresh → Return cached data
└─ Cache expired → Fetch from APIs (parallel)
├─ fetchPublicIP() → OGAds API
└─ CPALead API (via GitHub config URL)
└─ Combine → Cache → Update UI
| Setting | Value |
|---|---|
| Cache Duration | 30 minutes |
| Storage | In-memory (ViewModel) |
Cache is skipped and refreshed if forceRefresh = true or cache has expired.
Only visible in debug builds (hidden in release).
- Toggle via floating bug icon button
- Shows real-time logs with timestamps:
-
[CPALead]— CPALead API operations -
[OGAds]— OGAds API operations
-
[14:30:15] Starting offers fetch...
[14:30:16] Got public IP: 192.168.1.1
[14:30:18] [CPALead] Success! Got 15 offers
[14:30:19] [OGAds] Success! Got 8 offers
[14:30:19] Total offers: 23
| Scenario | Behavior |
|---|---|
| Network error | Show offline screen with retry |
| CPALead fails | Continue with OGAds only |
| OGAds fails | Continue with CPALead only |
| No offers | Show empty state with gift icon |
When a user shares an offer, the message format is:
🎁 *Offer Title*
🤖 *Supported Device:* Android
🇺🇸 *Available in:* United States
📝 *Description:*
Complete this offer to earn reward.
🔗 *Get this offer:*
https://offer-link.com
──────────────
📲 Download from PluginStream Max
🌐 https://pluginstream.pages.dev
US, CA, GB, AU, NZ, DE, FR, IN, BR, MX
{
"status": "success",
"number_offers": 15,
"offers": [
{
"id": 1234,
"title": "Game App Install",
"amount": 1.50,
"payout_currency": "USD",
"payout_type": "CPI",
"offer_rank": 1
}
]
}{
"success": true,
"offers": [
{
"offerid": 5678,
"name_short": "Survey App",
"payout": "2.00",
"link": "https://offer-link.com",
"country": "US,CA,GB"
}
]
}📺 PluginStream — Licensed under MIT License © 2026 Abdul Mueed