Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
this-Aditya committed Aug 1, 2024
1 parent 75c1602 commit d9084a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions plugins/radar-android-phone-audio-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This plugin provides an interactive UI for recording and managing audio data. Be
<img src="assets/images/audio_input_plugin/action_devices.jpg" width="200px" alt="action_devices"/>
<img src="assets/images/audio_input_plugin/recording_activity.jpg" width="200px" alt="recording_activity"/>
<br>
1. In the main activity, where plugins are visible along with their actions (if any), click on the specific action for the **Phone Audio Input** plugin.
1. In the main activity, where plugins are visible along with their actions (if any), click on the specific action for the Phone Audio Input plugin.
- This will redirect you to the first activity of the Phone Audio Input plugin.
<br>
<img src="assets/images/audio_input_plugin/recording_activity_devices.jpg" width="200px" alt="recording_activity_devices"/>
Expand All @@ -85,14 +85,14 @@ This plugin provides an interactive UI for recording and managing audio data. Be
<img src="assets/images/audio_input_plugin/alert_rec_ongoing.jpg" width="200px" alt="alert_rec_ongoing"/>
<img src="assets/images/audio_input_plugin/alert_rec_stopped.jpg" width="200px" alt="alert_rec_stopped"/>
<br>
3. Click **Start Recording** to begin recording audio.
3. Click Start Recording to begin recording audio.
- While recording, you can pause or resume the recording.
- Do not quit the recording activity while recording is in progress or paused, as this may cause the application to misbehave. An alert will also be shown if you attempt to quit the activity in a recording or paused state. You can safely quit the activity after stopping the recording.
<br>
<img src="assets/images/audio_input_plugin/playback_frag.jpg" width="200px" alt="playback_frag"/>
<img src="assets/images/audio_input_plugin/playback_exit_alert.jpg" width="200px" alt="playback_exit_alert"/>
<br>
4. After stopping the recording, an alert dialog will appear with three options: play the recorded audio, send it directly without playing, or discard it.
- If you click **Play**, you will be redirected to a new fragment for listening to the last recorded audio. Here, you can review the recording and send it after listening.
- If you click Play, you will be redirected to a new fragment for listening to the last recorded audio. Here, you can review the recording and send it after listening.


Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,21 @@ class PhoneAudioInputManager(service: PhoneAudioInputService) : AbstractSourceMa

private fun clearAudioDirectory() {
payloadSize = 0
audioDir?.let { audioDir ->
audioDir.parentFile
?.list { _, name -> name.startsWith("phone_audio_input") && name.endsWith(".wav") }
?.forEach {
File(audioDir.parentFile, it).delete()
logger.debug("Deleted audio file: {}", it)
}
audioDir?.let { audioDir ->
audioDir.parentFile
?.list { _, name -> name.startsWith("phone_audio_input") && name.endsWith(".wav") }
?.forEach {
File(audioDir.parentFile, it).delete()
logger.debug("Deleted audio file: {}", it)
}

audioDir.walk()
.filter { it.name.startsWith("phone_audio_input") && it.path.endsWith(".wav") }
.forEach {
it.delete()
logger.debug("Deleted file: {}", it)
}
}
audioDir.walk()
.filter { it.name.startsWith("phone_audio_input") && it.path.endsWith(".wav") }
.forEach {
it.delete()
logger.debug("Deleted file: {}", it)
}
}
}

private fun startAudioRecording() {
Expand Down

0 comments on commit d9084a7

Please sign in to comment.