# RecorderAndPlayer **Repository Path**: heyue/RecorderAndPlayer ## Basic Information - **Project Name**: RecorderAndPlayer - **Description**: 安卓录音播放 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-04-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RecorderAndPlayer 安卓录音播放 first Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { mUrl "https://jitpack.io" } } } Add the dependencydependencies { compile 'com.github.try1991:RecorderAndPlayer:1.15' } in your layout.xml in activity player = (VoicePlayer) findViewById(R.id.player); player.setBackGroundColor(Color.parseColor("#3F51B5")); player.setWaveColor(Color.parseColor("#000000")); VoiceRecorder recorder = new VoiceRecorder(); getSupportFragmentManager().beginTransaction() .replace(R.id.layout_record, recorder, "VoiceRecorder") .commitAllowingStateLoss(); recorder.setOnRecordSuccessListenter((path, length) -> { player.play(path, length); });