Note that there are some explanatory texts on larger screens.

plurals
  1. POautomatically stop recording in AudioRecord class
    primarykey
    data
    text
    <p>I found the code for storing audio in .wav format from this <a href="https://github.com/roman10/roman10-android-tutorial/tree/master/AndroidWaveRecorder" rel="nofollow">link</a>.The code has two buttons to start and stop the recording.I want to stop the audio recording after sometime.It uses the AudioRecord class of Android to store audio.Is it possible to do so?</p> <pre><code>04-19 08:20:00.688: E/AndroidRuntime(2405): FATAL EXCEPTION: main 04-19 08:20:00.688: E/AndroidRuntime(2405): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.androidwaverecorder/com.example.androidwaverecorder.MainActivity}: java.lang.NullPointerException 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread.access$600(ActivityThread.java:141) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.os.Handler.dispatchMessage(Handler.java:99) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.os.Looper.loop(Looper.java:137) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread.main(ActivityThread.java:5039) 04-19 08:20:00.688: E/AndroidRuntime(2405): at java.lang.reflect.Method.invokeNative(Native Method) 04-19 08:20:00.688: E/AndroidRuntime(2405): at java.lang.reflect.Method.invoke(Method.java:511) 04-19 08:20:00.688: E/AndroidRuntime(2405): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 04-19 08:20:00.688: E/AndroidRuntime(2405): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 04-19 08:20:00.688: E/AndroidRuntime(2405): at dalvik.system.NativeStart.main(Native Method) 04-19 08:20:00.688: E/AndroidRuntime(2405): Caused by: java.lang.NullPointerException 04-19 08:20:00.688: E/AndroidRuntime(2405): at com.example.androidwaverecorder.MainActivity.onCreate(MainActivity.java:47) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.Activity.performCreate(Activity.java:5104) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 04-19 08:20:00.688: E/AndroidRuntime(2405): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 04-19 08:20:00.688: E/AndroidRuntime(2405): ... 11 more 04-19 08:31:55.766: E/Trace(2899): error opening trace file: No such file or directory (2) 04-19 08:31:55.766: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:55.766: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:55.766: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:56.386: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:56.386: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:56.416: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 04-19 08:31:56.416: W/Trace(2899): Unexpected value from nativeGetEnabledTags: 0 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload