58258

Question:
i want make custome view meter which is spred when the user record the voice??
Does anyone know of any coding examples of a digital VU Meter for recording audio?
Does anyone know of any coding examples for showing feedback when a recording is being made?
<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/UbFY2.jpg" data-original="https://i.stack.imgur.com/UbFY2.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />
Answer1:This is a Mediastore file means Audio Recording .just like click the button and start the recording
public class MediastoreActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn = (Button)findViewById(R.id.recordBtn);
btn.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View view) {
startRecording();
}});
}
public void startRecording() {
Intent intt = new Intent("android.provider.MediaStore.RECORD_SOUND");
startActivityForResult(intt, 0);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case 0:
if (resultCode == RESULT_OK) {
Uri recordedAudioPath = data.getData();
}
}
}
}
This is a mail.xml file create only one button
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button android:id="@+id/recordBtn"
android:text="Record Audio"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>