Android :: MediaPlayer - Sound Stops When I Change - Suddenly Randomly In My Game

Jan 6, 2010

Why does my MediaPlayer
MediaPlayer mp = MediaPlayer.create(this, R.raw.somemusic); mp.setLooping(true); mp.start();

stop, wenn I change the layout?
setContentView(R.layout.screenoptions);

and also suddenly in my game, the sound stops. What could be the reason?

And which one is better? MediaPlayer or SoundPool?

Android :: MediaPlayer - Sound stops when I change - suddenly randomly in my game


Android :: MediaPlayer Stops Playing When Streaming Over 3G On The Nexus One

Apr 23, 2010

I am maintaining a streaming music player, and I'm running into a similar problem as http://www.last.fm/group/Last.fm+Android/forum/114391/_/593575

My player stop after roughly 1-2 minutes, and there are no log messages except for "I/AudioHardwareQSD( 52): AudioHardware pcm playback is going to standby" just after the playback stops.

This happens when I run it on the Nexus One over 3G. It does not happen over Wifi, and it does not happen on my HTC Hero with android 1.5 over 3G.

Do you guys have any hints on how to debug this? Is it e.g. possible to monitor the memory available to the media player object?

View 5 Replies View Related

Android :: Mediaplayer - Stop Button And That Stops Audio From Playing

Nov 18, 2009

I have a activity which is called from another activity as an intent... This activity loads and starts playing a audio file. All is good - that much works. The activity also has a "stop" button and that stops the audio from playing - that is also fine.

But how do I stop the file from playing if the user uses the back button to leave the activity without clicking on the "Stop" button?

View 3 Replies View Related

Android :: How To Make View Clickable When Mediaplayer Stops Playback?

Oct 12, 2010

I have Acvtivity that creates view and mediaplayer. I want to use OnCompletion event to make that view clickable. But it throws exception, I don't know why. Probably, mediaplayer runs in another thread and cannot access elements from main ui thread?

View 1 Replies View Related

Samsung Moment :: Audio Stops Suddenly / Get It To Start Again?

Jun 2, 2010

I rooted and installed a custom kernal several days ago and am very happy with the battery life. However I have a weird problem ever since. My audio stops working all the sudden out of the blue. Ring, text alert, etc. just stops. the only way I can get it to start again is rebooting. Anyone else having this issue? Can i fix it?

View 1 Replies View Related

Samsung Moment : Anyone Using Lock 2.0 - Suddenly Stops Working?

Apr 3, 2010

I figured I would try and use Lock 2.0 on my Moment - and it works for awhile, and then all of a sudden it stops working and my lock screen goes back to the standard lock.

View 4 Replies View Related

Android : JavaScript On Droid Randomly Stops Working / How To Fix?

May 3, 2010

I have an application that uses a WebView and a html-page with javascript functions. Randomly the JavaScript functions doesn't seem to be called. It works up to a random point (I have looked at this bug all day) can only be produced on hardware (HTC Legend) not on emulator.

View 2 Replies View Related

HTC Desire :: Internet Randomly Stops / Fix This

Nov 12, 2010

So I just got my HTC Desire today and so far I'm loving it. The main problem I'm having here is that my Internet will stop working after about 30 seconds of me not using it. I'm connected to wifi and have a 3G signal but for some reason it just stops. It seems to stop once I stop using the phone and unlock it and want to go on the Internet. I'm thinking maybe when the phone lock it just automatically loses connection or something. Does anyone know how I can fix this? Oh and it's the Telus version running on Fido.

View 1 Replies View Related

Android :: SharedPreferences Suddenly Deleted After I Updated Game In Market / Why Is So?

Feb 3, 2010

Why are my SharedPreferences suddenly deleted, after I updated my game in the Market?

Here is the logcat...

View 4 Replies View Related

General :: Task Manager Randomly Stops Working?

Apr 19, 2013

I'm using the Note 2 with Cleanrom 4.7.0 and Nova prime. I've searched the forums but can't find a solution. My task manager randomly stops working (press and hold home) at least once a day. I will get haptic feedback when the home button is long pressed but nothing will come up. Sometimes I'll long press the home button and the task manager will show up for a split second and then disappear. A restart usually fixes the problem but it's getting annoying as this happens a couple times a day.

View 2 Replies View Related

General :: SiriusXM And IHeartRadio Randomly Stops Working

Oct 23, 2012

For the last few days when my Razr Maxx screen goes to sleep my radio apps seem to lose connection and stop working. The apps don't close but the sound stops. If I reopen the app the sound will restart. If I don't allow the screen to go to sleep the apps work flawlessly.

View 2 Replies View Related

General :: Google Play Music On Nexus 4 Stops Randomly

Dec 5, 2013

A song can be playing then just stop. I have to hit the Play button again. It can continue for quite a while across multiple songs, or just stop again in 15 seconds, or 30 seconds, or 5 minutes, or ... Again and again. Needless to say, I want to throw it across the room when this happens right in the middle of an intense set of reps at the gym.

I'm not streaming, the music is loaded onto my phone. It happens at random points on random songs - the same song can play fine all the way through today, and not tomorrow. I'm using corded earbuds, but I don't think it's hardware as I've been sitting in a single position not moving (mid-strertch) with the phone on a separate, stable platform and it's just ... stopped. I've rebooted. I've removed and reinstalled Play Music.

I'm running a Nexus 4/KitKat on Telus. But from what I've googles, this problem isn't unique to the Nexus - but no one has found a solution.

Had this problem before loading Kit Kat but it seemed to have "mostly" gone away then come back again with KitKat. "Typically", but not always, music plays for a while but then once it stops the first time it just keeps it up.

View 8 Replies View Related

Sony Ericsson Xperia X10 :: When Typing Email / Message / Suddenly Stops Typing And Vibrates On It's Own

Sep 2, 2010

the HTC keyboard is going nuts itself.It's been like this since i've installed it like 2 weeks ago...When i'm typing email/message.it suddenly stops typing and vibrates on it's own.when i'm pressing erase it freeze and vibrates then deletes like a line of text.is this normal? what can i do to avoid it!

View 5 Replies View Related

Android :: Need To Use MediaPlayer - Multiple Sound Files

Mar 10, 2010

I need to use MediaPlayer to play some sounds, as they were too large in size for the SoundPool class.

The constructor takes a single sound file. I have, potentially, around 20 files that I want to play, randomly and instantly, like sounds in a game.

Do I have to create a new MediaPlayer object for each sound? i.e...

MediaPlayer mp1 = MediaPlayer.create(context, R.raw.sound1); MediaPlayer mp2 = MediaPlayer.create(context, R.raw.sound2); MediaPlayer mp3 = MediaPlayer.create(context, R.raw.sound3); MediaPlayer mp4 = MediaPlayer.create(context, R.raw.sound4);

That seems expensive...

View 6 Replies View Related

Android :: Noisy Music Sound While Playing (MediaPlayer)?

Jul 19, 2010

is there a way to find the 'noise produced' by a currently playing sound (MediaPlayer) -Like in many music editor software you import a song and it does a graphical layout of the song -like a graph with it higher up at louder bits. Hard to explain. But there must be a way to do this on android...

View 1 Replies View Related

Android :: Unable To Play Short MediaPlayer Sound

Apr 23, 2009

I have this task: Need to play short (0.3-0.4 sec) sounds all the time. When sound is played, it should start again, etc. User can press button to reset sound - it should stop and lunch.

I did many tests. I tried to create 1 MediaPlayer, then do this: MediaPlayer.OnCompletionListener complListener = new MediaPlayer.OnCompletionListener; code...

It works great on emulator and on device if I have eclipse+debugger on. When I disconnect debugger, I have very strange errors - sound can stop at all (till program restart), sound can start "repeating" (play 0.1-0.2 sec, then restart). Can someone please provide me some info about problem?

View 5 Replies View Related

Android :: MediaPlayer Plays Sound But Screen Is Black / No Video

Feb 14, 2009

I'm just trying to play a local video that is a resource with the MediaPlayer class in the most simple way possible. I have confirmed that the video works with players that I download from the marketplace, so I'm assuming that's not the issue.

The problem is that I just get a black screen with no video. There is audio from the file playing though, so I know that the file resource is being accessed correctly, it's just not showing anything on the screen in the emulator.

The one other note is that at any time whenever I try to access getVideoWidth() or getVideoHeight() I get this (non-blocking) error:

ERROR/MediaPlayerService(24): getVideoSize returned -1

Any ideas as to what I could be doing wrong?

import android.app.Activity; import android.os.Bundle; import android.view.SurfaceView; import android.view.SurfaceHolder; import android.media.MediaPlayer;
Code...

View 9 Replies View Related

Motorola Droid :: Speaker Sound Suddenly Reduced

Nov 7, 2009

I am not sure what happened, but at first the speakers when playing back audio was very loud and clear. Then, for seemingly no reason, it is barely audible even tuned all the way up. Did a press a setting somewhere by accident?

View 6 Replies View Related

Nexus :: Audible Selection - Sound Suddenly Very Quiet

Apr 13, 2010

It's that little "tick" sound you hear when you press an icon on the home page, or hit something on a menu, or click a link, etc. Mine is suddenly about 1/3 the volume it used to be. I checked the settings and I can turn it off in Sounds & Display...Audible Selection but I don't see any adjustment for the volume of it.

The only thing new in the past few days is that I got both the desk dock and car dock (the "quiet tick" problem is when it's not docked though).

Rebooted with no luck.

View 7 Replies View Related

General :: Order And Chaos Online V1.3.0 - Game Stops Without Warning

Jul 26, 2013

I own a rooted Prestigio Multipad Prime Duo 7" (PMP5770D) and I have a problem with "Order and Chaos online v1.3.0". As soon as I run the game, it stops without any warning. I've downloaded this game from a*kma*nia.co. What should I do? I solved Modern Combat 3 by changing the language in english.

View 3 Replies View Related

Android :: Can I Randomly View Image And Sound

Mar 30, 2010

I am new in android and using eclipse.

How can I Randomly view an image (images are saved in res/drawable) and the sound that belong that image (sounds are saved in res/raw).

View 1 Replies View Related

Android :: Randomly Generate Sound From OnClick And OnShake Events?

May 11, 2010

I've literally looked everywhere on the net and found very little
clarification on how to do this.
Pretty much, I have 8 sound files laid out in an array.xml file and I
need to play a randomly chosen file ONCE per or onClick or onShake.
First off, what technique should I use to achieve this? code...

View 3 Replies View Related

HTC EVO 4G :: Sound Stops Working After A Short Amount Of Time?

Jul 20, 2010

I downloaded an application named Todderlock so my children could just meddle around with my phone while they sat in my lap. However, the sound stops working after a non-specific amount of "dings" when either tapping the shapes around the screen, or when dragging your finger along the screen to make the same type of noise, but much more rapidly.

Thinking this was an application problem, I had my wife download Todderlock on her HTC Hero, and the sound works without issue.

So, I shrugged that off and went looking for other neat applications to download...I downloaded Bug Squash I, II and III and they all suffer from the same problem: after squishing X amount of bugs, the SFX stop (the music continues however), and I have to restart the application to enjoy the sound for as long as it lasts.

I was getting suspicious, so I loaded up Robo Defense FREE and the same thing happens when the turrets are firing...after X amount of shots fired, all sound ceases to work.

I have not been able to find a similar problem with the HTC Evo on Google or here on the Android forums, considering my wife's Hero works without issue on all the sound issues I am having.

As far as I know, phone notifications and ringers continue to work after the application has "disabled" the sound. I have not reset the phone to factory settings or anything, but I have restarted the phone itself numerous times, and the problem still persists.

View 1 Replies View Related

Motorola Droid X :: Media Sound Stops After Notification

Jul 20, 2010

It has NOT been this way from the beginning. When I am listening to music or playing a game, the sound will stop after a notification sound. If the screen is off like when I am playing music, then pushing the power button will start the sound again when the screen comes on.

View 1 Replies View Related

Android :: Can't Change MediaPlayer Data Source / Solution For This?

May 25, 2009

I'm experiencing some sort of problem. Let's say I have a MediaPlayer object wich can play an audio sound and a Resources object Code....

So when I invoke mp1.start() , sound1 plays, everything's normal.

But when I try to change the sound that my MediaPlayer should play, it doesn't work, here is what I do code...

I'm pretty sure someone can see a mistake in my code.

View 10 Replies View Related

HTC Incredible :: Notification Sound Changes Apparently Randomly

May 16, 2010

I keep running into a weird scenario with my Incredible (non-rooted, Android 2.1) where the notification sound changes to one of the other files on my SD card. I can't seem to make the notification sound stick.For example: this morning, I unmounted the SD card after syncing with Doubletwist on my PC and got into my car. When I turned on the car, the phone connected via Bluetooth to the stereo. Upon connection, the phone made a notification sound, but that sound had been changed from the default notification sound to one of my MP3s.

View 2 Replies View Related

Android :: MediaPlayer.start - Doesnot Work Fine After Calling MediaPlayer.seekTo - 0

Apr 27, 2009

I have a requirement to play several sounds many times in my game so instead of creating the MediaPlayer again and again I have called mp.seekTo(0) in onCompletion(mp) so that it will restart. Sometimes the sound is not audible from the device when I call mp.start () after setting mp.seekTo(0); but the player calls onCompletion() without playing any sound, this is observed randomly on most of the sounds

My sounds are of short duration mostly less than a second.

I am using a separate MediaPlayer for each sound (as I need this) -

There are almost 28 sounds in my game so i will be creating 28 MediaPlayers.

Below is the attached code for player

Also If I try to play many sounds one after the other in a short period of time i get an error saying "no more track names available". can u tell Why this is happening...?

check the below code:

CODE:........

View 9 Replies View Related

Android :: Bug-free Way To Implement Sound Effects In Game?

Oct 9, 2009

I have pretty common question: is there any bug-free way to implement sound effects in a game?Or we only have unpredictable SoundPool with its horrible bugs? Or MediaPlayer that can only play one sound at once and which is not solution for a game at all?In fact, it is disturbing question for numerous developers right now!

View 5 Replies View Related

Sprint HTC Hero : Notification Sound Change - Different Sound Than The Other

Apr 28, 2010

Right now my phone makes the same sound whether I get a email or a text message. Can I make one have a different sound than the other? If so please tell me in detail how. I only see one notification sound area.

View 7 Replies View Related

Android :: Change Low Quality Image To High When Animation Stops In Gallery?

Jan 24, 2010

I want to do an image gallery like in iphone. I want to show low quality (pre-resized) images and when the image is active I want to process the big image and show the result in the gallery. I have two questions. How to attach a listener on the animation stop in gallery? And how to access an image after this action?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved