# Android app-এ cPanel API যুক্ত করার গাইড

Admin panel-এ নতুন channel বা setting save হলে database বদলায়। Android app-কে API থেকে JSON fetch করতে হবে; কেবল panel বানালে app নিজে নিজে data পাবে না।

## Endpoints
- `GET https://YOUR-DOMAIN.example/api/channels.php`
- `GET https://YOUR-DOMAIN.example/api/settings.php`

## Example JSON
```json
{
  "ok": true,
  "channels": [
    {
      "id": 1,
      "name": "Bangla Demo",
      "category": "Bangla",
      "streamUrl": "https://YOUR-AUTHORIZED-STREAM/channel.m3u8",
      "logoUrl": null,
      "isPremium": false,
      "isActive": true,
      "sortOrder": 0
    }
  ]
}
```

## Kotlin integration outline
Use an HTTP client (e.g. OkHttp) to fetch the JSON over HTTPS on a background coroutine, parse the `channels` array into your channel model, then update Compose state. Fetch at app start and when the user presses Refresh or returns to the foreground. For near-real-time changes, add a refresh interval or a push mechanism; avoid excessive polling.

Do not store bKash API keys in the app. Subscription status must be checked by your backend, not by a local boolean. Never trust client-only premium flags for access control.
