Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aykuttasil committed Feb 9, 2019
1 parent 2a78825 commit d6a3c12
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 68 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
<img src="logo/1024.svg" width=100%>
</h1>

# Anroid Call Recorder
# Android Call Recorder

[![](https://jitpack.io/v/aykuttasil/CallRecorder.svg)](https://jitpack.io/#aykuttasil/CallRecorder)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Call%20Recorder-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4544)

Android incomig and outgoing call recorder at any time.
Android incoming and outgoing call recorder at any time.

# How to Use

```java
callRecord = new CallRecord.Builder(this)
.setLogEnable(true)
.setRecordFileName("RecordFileName")
.setRecordDirName("RecordDirName")
.setRecordDirPath(Environment.getExternalStorageDirectory().getPath()) // optional & default value
Expand Down
66 changes: 0 additions & 66 deletions app/src/main/java/com/aykuttasil/callrecorder/MainActivity.java

This file was deleted.

66 changes: 66 additions & 0 deletions app/src/main/java/com/aykuttasil/callrecorder/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package com.aykuttasil.callrecorder

import android.media.MediaRecorder
import android.os.Bundle
import android.view.View

import com.aykuttasil.callrecord.CallRecord
import com.aykuttasil.callrecord.helper.LogUtils

import androidx.appcompat.app.AppCompatActivity

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.init(this);
callRecord = CallRecord.Builder(this)
.setLogEnable(true)
.setRecordFileName("CallRecorderTestFile")
.setRecordDirName("CallRecorderTest")
.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION)
.setShowSeed(true)
.build()

//callRecord.changeReceiver(new MyCallRecordReceiver(callRecord));

//callRecord.enableSaveFile();

/*
callRecord = new CallRecord.Builder(this)
.setRecordFileName("Record_" + new SimpleDateFormat("ddMMyyyyHHmmss", Locale.US).format(new Date()))
.setRecordDirName("CallRecord")
.setRecordDirPath(Environment.getExternalStorageDirectory().getPath())
.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB)
.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION)
.setShowSeed(true)
.buildService();
callRecord.startCallRecordService();
*/
}

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

//callRecord.enableSaveFile();
//callRecord.changeRecordDirName("NewDirName");
}

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

//callRecord.disableSaveFile();
//callRecord.changeRecordFileName("NewFileName");
}
}

0 comments on commit d6a3c12

Please sign in to comment.