Skip to content

Commit

Permalink
Update sample module to show audio session id in log
Browse files Browse the repository at this point in the history
  • Loading branch information
squti committed Aug 5, 2020
1 parent 81798eb commit 9056378
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ package com.github.squti.androidwaverecordersample
import android.Manifest
import android.content.pm.PackageManager
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -40,7 +41,6 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch

class MainActivity : AppCompatActivity() {

private val PERMISSIONS_REQUEST_RECORD_AUDIO = 77

private lateinit var waveRecorder: WaveRecorder
Expand Down Expand Up @@ -117,6 +117,7 @@ class MainActivity : AppCompatActivity() {
}

private fun startRecording() {
Log.d(TAG, waveRecorder.audioSessionId.toString())
isRecording = true
messageTextView.visibility = View.GONE
recordingTextView.text = "Recording..."
Expand Down Expand Up @@ -160,4 +161,8 @@ class MainActivity : AppCompatActivity() {
}
}
}

companion object {
private const val TAG = "MainActivity"
}
}

0 comments on commit 9056378

Please sign in to comment.