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 9193767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:14:34+00:00 2026-06-17T21:14:34+00:00

I’m running into this problem, where the audio just doesnt want to play. There

  • 0

I’m running into this problem, where the audio just doesnt want to play. There are no errors, but i dont hear the music when im supposed to. Heres the code below, and the logcat. I dont know how to read the logcat, and that might help solve the problem.

public void start1(final View view)
    {
    setContentView(R.layout.timer); 
    if(path1.equals("default"))
     {
         path1="R.raw.iwilltouchthesky.mp3";
     }


     mp.reset();
     try {
        mp.setDataSource(path1);
    } catch (IllegalArgumentException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IllegalStateException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
     mp.start();    
    text = (TextView) this.findViewById(R.id.textView1);
    text2 = (TextView) this.findViewById(R.id.textView3);
    a=new CountDownTimer(interval1*1000, 1000) {
        public void onTick(long millisUntilFinished) {
            text.setText("Seconds Remaining: " + (millisUntilFinished / 1000));
            text2.setText("Repetitions Left: "+repsleft);
        }

        public void onFinish() {
            mp.stop();
         start2(view);
        }
     }.start();
    }

The logcat

01-26 20:28:48.620: I/InputReader(1908): dispatchTouch::touch event's action is 0 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0]
01-26 20:28:48.620: I/InputDispatcher(1908): Delivering touch to current input target: action: 0, channel 'xxxx'
01-26 20:28:48.620: I/InputDispatcher(1908): Delivering touch to current input target: action: 0, channel 'xxxx'
01-26 20:28:48.620: D/LightsService(1908): setLight_native: 2
01-26 20:28:48.620: E/lights(1908): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 1
01-26 20:28:48.620: I/PowerManagerService(1908): Ulight 3->7|0
01-26 20:28:48.620: D/PowerManagerService(1908): setLightBrightness : mButtonLight : 118
01-26 20:28:48.620: V/LightsService(1908): setLight #2 #ff767676
01-26 20:28:48.695: I/InputReader(1908): dispatchTouch::touch event's action is 1 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0]
01-26 20:28:48.695: I/InputDispatcher(1908): Delivering touch to current input target: action: 1, channel 'xxxx'
01-26 20:28:48.695: I/InputDispatcher(1908): Delivering touch to current input target: action: 1, channel 'xxxx'
01-26 20:28:48.695: I/AudioService(1908): playSoundEffect() type:0 volume:-1
01-26 20:28:48.700: I/AudioPolicyManagerBase(1757): getSituationVolume: isBTConnected:0 isHeadConnected:0
01-26 20:28:48.700: I/AudioPolicyManager(1757): getParamFromPolicy  deviceInt = 0, situationInt = 1, situationVolume = 0.300000
01-26 20:28:48.700: I/AudioPolicyManager(1757): startOutput() output 1, stream 1, session 17216
01-26 20:28:48.700: I/AudioFlinger(1757): start output streamType (0, 1) for 1
01-26 20:28:48.700: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::createVolume()
01-26 20:28:48.700: V/yamaha::media::UserDep(1757): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h
01-26 20:28:48.700: V/yamaha::media::UserDep(1757):                       incall: onoff=0, devices=00000000h
01-26 20:28:48.700: V/yamaha::media::UserDep(1757):                       capture: onoff=0, devices=00100000h, audioSource=6
01-26 20:28:48.700: V/yamaha::media::UserDep(1757):                       playback: audio_onoff=0, line_onoff=0)
01-26 20:28:48.700: V/yamaha::media::UserDep(1757): ALL Off
01-26 20:28:48.700: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume()
01-26 20:28:48.700: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() FM Playback: Ready
01-26 20:28:48.700: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() VoiceCall: Ready
01-26 20:28:48.745: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::createVolume()
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): Dir0      : AP Playback Music SP (0001h)
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): Dir0Att   : AP Playback Music SP (0001h)
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): DacMaster : AP Playback Music SP (0101h)
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): Sp        : AP Playback Music SP (0001h)
01-26 20:28:48.745: E/yamaha::media::VolumeCtrl(1757): Dir0      : AP Playback Music SP (0001h)
01-26 20:28:48.745: E/yamaha::media::VolumeCtrl(1757): Dir0Att   : AP Playback Music SP (0001h)
01-26 20:28:48.745: E/yamaha::media::VolumeCtrl(1757): DacMaster : AP Playback Music SP (0101h)
01-26 20:28:48.745: E/yamaha::media::VolumeCtrl(1757): Sp        : AP Playback Music SP (0001h)
01-26 20:28:48.745: V/yamaha::media::UserDep(1757): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h
01-26 20:28:48.745: V/yamaha::media::UserDep(1757):                       incall: onoff=0, devices=00000000h
01-26 20:28:48.745: V/yamaha::media::UserDep(1757):                       capture: onoff=0, devices=00100000h, audioSource=6
01-26 20:28:48.745: V/yamaha::media::UserDep(1757):                       playback: audio_onoff=1, line_onoff=0)
01-26 20:28:48.745: V/yamaha::media::UserDep(1757): Playback[Audio], Output[dev:DAC, NonAE]
01-26 20:28:48.745: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) HPOUT Off
01-26 20:28:48.745: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) RCOUT Off
01-26 20:28:48.745: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) LINEOUT1 Off
01-26 20:28:48.745: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume()
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() FM Playback: Ready
01-26 20:28:48.745: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() VoiceCall: Ready
01-26 20:28:48.770: D/AndroidRuntime(16000): Shutting down VM
01-26 20:28:48.775: W/dalvikvm(16000): threadid=1: thread exiting with uncaught exception (group=0x40c251f8)
01-26 20:28:48.795: E/AndroidRuntime(16000): FATAL EXCEPTION: main
01-26 20:28:48.795: E/AndroidRuntime(16000): java.lang.IllegalStateException: Could not execute method of the activity
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.view.View$1.onClick(View.java:3098)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.view.View.performClick(View.java:3620)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.view.View$PerformClick.run(View.java:14292)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.os.Handler.handleCallback(Handler.java:605)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.os.Handler.dispatchMessage(Handler.java:92)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.os.Looper.loop(Looper.java:137)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.app.ActivityThread.main(ActivityThread.java:4507)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at java.lang.reflect.Method.invokeNative(Native Method)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at java.lang.reflect.Method.invoke(Method.java:511)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at dalvik.system.NativeStart.main(Native Method)
01-26 20:28:48.795: E/AndroidRuntime(16000): Caused by: java.lang.reflect.InvocationTargetException
01-26 20:28:48.795: E/AndroidRuntime(16000):    at java.lang.reflect.Method.invokeNative(Native Method)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at java.lang.reflect.Method.invoke(Method.java:511)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.view.View$1.onClick(View.java:3093)
01-26 20:28:48.795: E/AndroidRuntime(16000):    ... 11 more
01-26 20:28:48.795: E/AndroidRuntime(16000): Caused by: java.lang.IllegalStateException
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.media.MediaPlayer._reset(Native Method)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at android.media.MediaPlayer.reset(MediaPlayer.java:1339)
01-26 20:28:48.795: E/AndroidRuntime(16000):    at phil.H.com.HIITActivity.start1(HIITActivity.java:165)
01-26 20:28:48.795: E/AndroidRuntime(16000):    ... 14 more
01-26 20:28:48.835: I/ALSAModule(1757): Initialized ALSA PLAYBACK device hifi
01-26 20:28:48.860: E/android.os.Debug(1908): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
01-26 20:28:48.870: I/dumpstate(16023): Check if stand-alone
01-26 20:28:48.875: D/dalvikvm(16000): GC_CONCURRENT freed 381K, 5% free 8972K/9415K, paused 4ms+2ms
01-26 20:28:48.885: I/dumpstate(16023): begin
01-26 20:28:49.000: I/AudioPolicyManager(1757): stopOutput() output 1, stream 1, session 17216
01-26 20:28:49.025: I/AudioFlinger(1757): stop output streamType (0, 1) for 1
01-26 20:28:49.360: W/ActivityManager(1908): Activity pause timeout for r
01-26 20:28:49.530: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::createVolume()
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): Dir0      : AP Playback Music SP (0001h)
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): Dir0Att   : AP Playback Music SP (0001h)
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): DacMaster : AP Playback Music SP (0101h)
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): Sp        : AP Playback Music SP (0001h)
01-26 20:28:49.530: E/yamaha::media::VolumeCtrl(1757): Dir0      : AP Playback Music SP (0001h)
01-26 20:28:49.530: E/yamaha::media::VolumeCtrl(1757): Dir0Att   : AP Playback Music SP (0001h)
01-26 20:28:49.530: E/yamaha::media::VolumeCtrl(1757): DacMaster : AP Playback Music SP (0101h)
01-26 20:28:49.530: E/yamaha::media::VolumeCtrl(1757): Sp        : AP Playback Music SP (0001h)
01-26 20:28:49.530: V/yamaha::media::UserDep(1757): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h
01-26 20:28:49.530: V/yamaha::media::UserDep(1757):                       incall: onoff=0, devices=00000000h
01-26 20:28:49.530: V/yamaha::media::UserDep(1757):                       capture: onoff=0, devices=00100000h, audioSource=6
01-26 20:28:49.530: V/yamaha::media::UserDep(1757):                       playback: audio_onoff=1, line_onoff=0)
01-26 20:28:49.530: V/yamaha::media::UserDep(1757): Playback[Audio], Output[dev:DAC, NonAE]
01-26 20:28:49.530: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) HPOUT Off
01-26 20:28:49.530: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) RCOUT Off
01-26 20:28:49.530: V/yamaha::media::UserDep(1757): editDacDst(devices=2h) LINEOUT1 Off
01-26 20:28:49.530: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume()
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() FM Playback: Ready
01-26 20:28:49.530: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() VoiceCall: Ready
01-26 20:28:50.120: D/LightsService(1908): setLight_native: 2
01-26 20:28:50.120: E/lights(1908): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 2
01-26 20:28:50.120: W/PowerManagerService(1908): Timer 0x7->0x3|0x0
01-26 20:28:50.120: I/PowerManagerService(1908): Ulight 7->3|0
01-26 20:28:50.120: D/PowerManagerService(1908): setLightBrightness : mButtonLight : 0
01-26 20:28:50.120: V/LightsService(1908): setLight #2 #ff000000
01-26 20:28:52.090: I/ALSAModule(1757): Terminated ALSA PLAYBACK device hifi
01-26 20:28:52.510: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::createVolume()
01-26 20:28:52.510: V/yamaha::media::UserDep(1757): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h
01-26 20:28:52.510: V/yamaha::media::UserDep(1757):                       incall: onoff=0, devices=00000000h
01-26 20:28:52.510: V/yamaha::media::UserDep(1757):                       capture: onoff=0, devices=00100000h, audioSource=6
01-26 20:28:52.510: V/yamaha::media::UserDep(1757):                       playback: audio_onoff=0, line_onoff=0)
01-26 20:28:52.510: V/yamaha::media::UserDep(1757): ALL Off
01-26 20:28:52.510: V/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume()
01-26 20:28:52.510: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() FM Playback: Ready
01-26 20:28:52.510: D/yamaha::media::VolumeCtrl(1757): VolumeCtrl::setVolume() VoiceCall: Ready
01-26 20:28:52.570: D/PowerManagerService(1908): mIsLockZone =  false
01-26 20:28:55.685: D/VoldCmdListener(1746): asec list
01-26 20:28:55.690: D/VoldCmdListener(1746): CommandListener::AsecCmd::runCommand -> -- 
01-26 20:28:56.095: D/BatteryService(1908): update start
01-26 20:28:56.095: D/BatteryService(1908): level:73 scale:100 status:2 health:2 present:true voltage: 4011 temperature: 310 technology: Li-ion AC powered:false USB powered:true icon:17302822 invalid charger:0
: E/(): Device disconnected
  • 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-06-17T21:14:35+00:00Added an answer on June 17, 2026 at 9:14 pm

    Try this :

    EDIT:

    //Play music
        public void playSound(int id){
                try{
                    mp = MediaPlayer.create(mContext, id);
                    mp.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                        @Override
                        public void onPrepared(MediaPlayer arg0) {
                            mp.start();  
                        }
                    });
                    mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener () {
    
                        @Override
                        public void onCompletion(MediaPlayer mp) {
                            // TODO Auto-generated method stub
                            mp.release();
                        }});
                }
                catch (Exception e) {
                    // TODO: handle exception
                    Log.v("Sound Exception","Sound Exception = "+e.getMessage());
                }
        }
    

    And call this way,

    playSound(R.raw.iwilltouchthesky);
    

    You can’t use path in this way "R.raw.iwilltouchthesky.mp3" from the raw folder.

    Thanks.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I want to construct a data frame in an Rcpp function, but when I

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.