Skip to content
TheChatArchiveThe Chat Archive
Perplexitysonar-reasoning· PerplexityHugging Face LMArena Search Arena 24K

Hi, I have to implement call audio recording in a custom built dialer app. Since google…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Perplexitysonar-reasoning-pro-high’s answer.
  1. User

    Hi, I have to implement call audio recording in a custom built dialer app.

    Since google doesn't allow through it's api due to privacy concerns. we have to find clever ways to implement it and the app is only deployed to the countries where call recordings are legal.

    One of the ways is using accessibility feature but you may find other creative ways to make this work.

    Language used is kotlin, IDE is android studio

    find me latest github repos that works

  2. Perplexity Assistant

    Implementing call recording in Android apps remains challenging due to Google's restrictions, but here are the latest workarounds and repositories as of 2025:

    Current Landscape

    Google banned Accessibility API misuse for call recording in May 2022[2][3], making most third-party solutions non-compliant with Play Store policies. However, these methods still work for side-loaded apps in regions where call recording is legal:


    1. Conference Call Method

    Rekk Call Recorder (Example Implementation)
    Creates a 3-way conference call with a silent participant to capture audio:

    val intent = Intent(Intent.ACTION_CALL).apply {
        data = Uri.parse("tel:${phoneNumber},12345") // Add silent conference number
        putExtra(TelecomManager.EXTRA_START_CALL_WITH_SPEAKERPHONE, true)
    }
    startActivity(intent)
    
    • Requirements: Carrier-supported conference calling
    • Advantages: Works on Android 5+ without root[3]
    • Limitations: Depends on carrier features

    2. Custom Dialer Integration

    ACR Phone Helper (GitHub)
    Open-source solution using low-level audio routing:

    class CallRecorderService : Service() {
        private val audioSource = MediaRecorder.AudioSource.VOICE_CALL
        
        override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
            MediaRecorder().apply {
                setAudioSource(audioSource)
                setOutputFormat(OutputFormat.THREE_GPP)
                setAudioEncoder(AudioEncoder.AMR_NB)
                setOutputFile(recordingPath)
                prepare()
                start()
            }
            return START_STICKY
        }
    }
    
    • Key Permissions:
      <uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"></uses-permission>
      

    
    ---
    
    ### 3. **Device-Specific APIs**
    For Samsung devices, use **CSC customization**:
    ```bash
    # Change CSC code to enable native recording
    adb shell pm grant com.samsung.android.dialer android.permission.WRITE_SECURE_SETTINGS
    adb shell settings put system csc_country_code ILO # Israel (enabled region)
    
    • Requirements: ADB access, compatible Samsung devices[6]

    4. Audio Routing Workarounds

    AndroidDeveloperLB/PhoneCallRecorder (GitHub)
    Uses audio focus manipulation:

    val audioManager = getSystemService(AUDIO_SERVICE) as AudioManager
    audioManager.requestAudioFocus(
        { /* Handle focus changes */ },
        AudioManager.STREAM_VOICE_CALL,
        AudioManager.AUDIOFOCUS_GAIN_TRANSIENT
    )
    
    • Tested On: Android 12+ with modified audio policies[4]

    Implementation Considerations

    1. Legal Compliance: Add dual-party consent UI:
      AlertDialog.Builder(this)
          .setMessage("This call is being recorded")
          .setPositiveButton("Accept") { _, _ -&gt; startRecording() }
          .setNegativeButton("Decline") { _, _ -&gt; finish() }
          .show()
      
    2. File Management: Use WorkManager for automated uploads:
      val uploadWork = PeriodicWorkRequestBuilder<uploadworker>(24, TimeUnit.HOURS).build()
      WorkManager.getInstance(context).enqueue(uploadWork)
      

    For production use, consider combining conference calling with custom audio routing, as demonstrated in the ACR Phone Helper repository[5]. Always verify regional legality before deployment.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.