package com.dmc.callcrm /** * Central config for where the app sends data. * * BASE_URL must end with a trailing slash and point at the /api/ folder * on your server (the PHP backend in this repo). * * APP_SECRET must match APP_SECRET in backend/config.php (leave "" to disable). */ object ApiConfig { const val BASE_URL = "https://callcrm.dholerametrocityoffer.com/dmc-call-crm/backend/api/" const val APP_SECRET = "" // set the same value on the server if you enable it // How often the background worker force-syncs, in minutes (min allowed by WorkManager is 15). const val SYNC_INTERVAL_MIN = 15L // How many days of history to read on the very first sync (call logs AND // recordings) — without this, a phone with years of call history would // try to sync everything at once, which is slow. Wired up in Syncer.kt // and RecordingUploader.kt. const val FIRST_SYNC_DAYS = 120 // ---- Call recording ---- // "oem" = only harvest files made by the phone's built-in recorder (best quality, both sides) // "mic" = record via microphone during the call (works on Android 10-13 without an OEM recorder) // "both" = do both (may create two recordings per call on devices that have an OEM recorder) const val RECORDING_MODE = "oem" // For mic mode: force speakerphone ON during the call so the CLIENT's voice is captured too. // Without this you mostly capture the employee's side. Intrusive but necessary for both sides. const val AUTO_SPEAKER_DURING_CALL = false // Mic recording quality const val MIC_SAMPLE_RATE = 44100 const val MIC_BITRATE = 96000 /** URL the in-app player streams from for a given recording (see api/recording.php). */ fun recordingStreamUrl(recordingId: Long, apiToken: String): String = "$BASE_URL" + "recording.php?recording_id=$recordingId&api_token=$apiToken" }