Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6714597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:30:51+00:00 2026-05-26T08:30:51+00:00

I have devlope application in which i can record audio and store it in

  • 0

I have devlope application in which i can record audio and store it in sd card but here raise some problem which i have mention here:: and also confuse in this line AudioRecorder2 au = new AudioRecorder2(""); is that which path i could set?

3 rd Update ::

LOGCAT ::

10-25 11:55:07.726: ERROR/AndroidRuntime(751): Uncaught handler: thread main exiting due to uncaught exception
10-25 11:55:07.736: ERROR/AndroidRuntime(751): java.lang.IllegalStateException
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.media.MediaRecorder.start(Native Method)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.testAudio.testAudio1.startRecording(testAudio1.java:74)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.testAudio.testAudio1.onRecord(testAudio1.java:31)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.testAudio.testAudio1.access$0(testAudio1.java:29)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.testAudio.testAudio1$RecordButton$1.onClick(testAudio1.java:88)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.View.performClick(View.java:2179)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.View.onTouchEvent(View.java:3828)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.widget.TextView.onTouchEvent(TextView.java:6291)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.View.dispatchTouchEvent(View.java:3368)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1197)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.app.Activity.dispatchTouchEvent(Activity.java:1993)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.os.Looper.loop(Looper.java:123)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at android.app.ActivityThread.main(ActivityThread.java:3948)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at java.lang.reflect.Method.invokeNative(Native Method)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at java.lang.reflect.Method.invoke(Method.java:521)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
10-25 11:55:07.736: ERROR/AndroidRuntime(751):     at dalvik.system.NativeStart.main(Native Method)

Main Activity :

package com.testAudio;

import java.io.IOException;

import android.app.Activity;
import android.content.Context;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;


public class testAudio1 extends Activity
{
    private static final String LOG_TAG = "AudioRecordTest";
    private static String mFileName = null;

    private RecordButton mRecordButton = null;
    private MediaRecorder mRecorder = null;

    private PlayButton   mPlayButton = null;
    private MediaPlayer   mPlayer = null;

    private void onRecord(boolean start) {
        if (start) {
            startRecording();
        } else {
            stopRecording();
        }
    }

    private void onPlay(boolean start) {
        if (start) {
            startPlaying();
        } else {
            stopPlaying();
        }
    }

    private void startPlaying() {
        mPlayer = new MediaPlayer();
        try {
            mPlayer.setDataSource(mFileName);
            mPlayer.prepare();
            mPlayer.start();
        } catch (IOException e) {
            Log.e(LOG_TAG, "prepare() failed");
        }
    }

    private void stopPlaying() {
        mPlayer.release();
        mPlayer = null;
    }

    private void startRecording() {
        mRecorder = new MediaRecorder();
        mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mRecorder.setOutputFile(mFileName);
        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

        try {
            mRecorder.prepare();
        } catch (IOException e) {
            Log.e(LOG_TAG, "prepare() failed");
        }

        mRecorder.start();
    }

    private void stopRecording() {
        mRecorder.stop();
        mRecorder.release();
        mRecorder = null;
    }

    class RecordButton extends Button {
        boolean mStartRecording = true;

        OnClickListener clicker = new OnClickListener() {
            public void onClick(View v) {
                onRecord(mStartRecording);
                if (mStartRecording) {
                    setText("Stop recording");
                } else {
                    setText("Start recording");
                }
                mStartRecording = !mStartRecording;
            }
        };

        public RecordButton(Context ctx) {
            super(ctx);
            setText("Start recording");
            setOnClickListener(clicker);
        }
    }

    class PlayButton extends Button {
        boolean mStartPlaying = true;

        OnClickListener clicker = new OnClickListener() {
            public void onClick(View v) {
                onPlay(mStartPlaying);
                if (mStartPlaying) {
                    setText("Stop playing");
                } else {
                    setText("Start playing");
                }
                mStartPlaying = !mStartPlaying;
            }
        };

        public PlayButton(Context ctx) {
            super(ctx);
            setText("Start playing");
            setOnClickListener(clicker);
        }
    }

    public testAudio1() {
        mFileName = Environment.getExternalStorageDirectory().getAbsolutePath();
        mFileName += "/audiorecordtest.3gp";
    }

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        LinearLayout ll = new LinearLayout(this);
        mRecordButton = new RecordButton(this);
        ll.addView(mRecordButton,
            new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                0));
        mPlayButton = new PlayButton(this);
        ll.addView(mPlayButton,
            new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                0));
        setContentView(ll);
    }

    @Override
    public void onPause() {
        super.onPause();
        if (mRecorder != null) {
            mRecorder.release();
            mRecorder = null;
        }

        if (mPlayer != null) {
            mPlayer.release();
            mPlayer = null;
        }
    }
}

Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.testAudio"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="3" />
    <uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".testAudio1"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
</manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:30:52+00:00Added an answer on May 26, 2026 at 8:30 am

    From your this exception:

    10-25 10:33:21.063: ERROR/AndroidRuntime(783): Caused by: java.lang.ClassNotFoundException: com.ShaneshRecording.ShaneshRecording in loader dalvik.system.PathClassLoader@435986e0
    10-25 10:33:21.063: ERROR/AndroidRuntime(783):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    10-25 10:33:21.063: ERROR/AndroidRuntime(783):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    10-25 10:33:21.063: ERROR/AndroidRuntime(783):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    10-25 10:33:21.063: ERROR/AndroidRuntime(783):     at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
    10-25 10:33:21.063: ERROR/AndroidRuntime(783):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
    10-
    

    This exception says that class is missing to load at runtime so i am sure you have defined android:name attribute in <application> tag inside the AndroidManifest.xml file.

    If you have defined this attribute then remove it and check it again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been still learning Hibernate and I need to develope application which can
Hie Everyone I have 1st time developed SSRS in my WPF application.. but there
I have developed a web application, in which there's a functionality to enter note
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
Have a n-tire web application and search often times out after 30 secs. How
I have to develope something to hold blob's. I have a various options but
I'm looking for Delphi sample code to develope a Win32 Windows service which can
I am going to develope application using jira 4.0 api. I have analyzed a
We have been having serious trouble getting an application we devlop running with UAC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.