Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

350
Views
How To Record Calls In Android Devices Using Kotlin?

I want to make an Android application that can record both incoming and outgoing calls in the background as a service in kotlin and at a particular time in the day, it sends all that recordings to a server by API. I had researched about it all I found is to use Device Policy Manager and Telephoney Manager but it is not much about it on the internet. So can you help me with any article, documentation, or tutorial?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

first create MyCallRecordReceiver class

    class MyCallRecordReceiver(callRecord: CallRecord) : CallRecordReceiver(callRecord) {


    override fun onIncomingCallReceived(context: Context, number: String?, start: Date) {
        super.onIncomingCallReceived(context, number, start)
    }
}

then in MainActivity

class MainActivity : AppCompatActivity() {

companion object {
    private val TAG = MainActivity::class.java.simpleName
}

private lateinit var callRecord: CallRecord

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
  
    callRecord = CallRecord.Builder(this)
        .setLogEnable(true)
        .setRecordFileName("CallRecorderTestFile")
        .setRecordDirName("CallRecorderTest")
        .setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION)
        .setShowSeed(true)
        .build()

}

fun StartCallRecordClick(view: View) {
    LogUtils.i(TAG, "StartCallRecordClick")
    callRecord.startCallReceiver()

}

fun StopCallRecordClick(view: View) {
    LogUtils.i(TAG, "StopCallRecordClick")
    callRecord.stopCallReceiver()

}
}

In addition Add it as a dependency in your app's build.gradle file

    allprojects {
  repositories {
    maven { url 'https://jitpack.io' }  
  }
}

and this

compile 'com.github.aykuttasil:CallRecorder:1.5.3'
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!