Android :: Playing Default Ringtone With SoundPool Or MediaPlayer

Oct 31, 2010

How do I get the default ringtone to play? I've tried using SoundPool (preferred method) and MediaPlayer to play it but I'm getting nowhere. I've done so many dumb things, I'll just include the last fail. In the following snippet: String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath(); SoundPool ringPhone = new SoundPool(1, AudioManager.STREAM_RING, 0); int soundID = ringPhone.load Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1); ringPhone.play(soundID, 0.99f, 0.99f, 1, 0, 1.0f);

loads but plays nothing. When I display Settings.System.DEFAULT_RINGTONE_URI.getPath(), it's returning /system/ ringtone

Android :: Playing default ringtone with SoundPool or MediaPlayer


Android :: Playing Default Ringtone Using SoundPool

Nov 1, 2010

I've been trying to use SoundPool to play the default ringtone without success. In the code below

String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath();
SoundPool ringPhone = new SoundPool(2, AudioManager.STREAM_RING, 1);
int soundID = ringPhone.load(Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1);
int soundID = ringPhone.load(ringtone, 1);
ringPhone.play(soundID, 0.99f, 0.99f, 1, 0, 1);

I get the message "error loading content /system/ringtone sample 0 not READY". Replacing the URI with a hard path to an existing mp3 file on the sd card yields similar results.

View 1 Replies View Related

Android :: Setting A New Default Ringtone Without Ringtone Picker

Mar 28, 2010

I'd like to set a new default ringtone without using the ringtone picker. In other words, there is a certain ringtone that is already installed on my system, and I want to programmatically set it to be my default ringtone without any human interaction. The reason I want this is because every time I reboot my N-1, my previous default ringtone setting gets forgotten, and I am given another ringtone that I don't like. I want to set up an app that I can run manually (or better yet, to cause to automatically run upon startup) which will reset my default ringtone to the one that I like without my having to manually do this via the Settings.
The only examples I have found so far for doing this involve using the ringtone picker, but as far as I can tell, this requires human interaction, which I want to avoid.

View 5 Replies View Related

Android :: MediaPlayer Not Playing Music Track / Why Is This?

Aug 9, 2010

I have followed the steps to create my media player object but I cant understand why it is not playing the music track. I used the following code...

but no sound is playing through the emulator, and furthermore when i check the method mp.isPlaying() it returns false. What have I missed?

View 2 Replies View Related

Android :: Playing Audio Stream Not Working Using MediaPlayer

Nov 27, 2009

I am trying to make a very simple radio player for Android and I cannot get the audio streaming to work. In my latest attempt it plays for about 1 second and stops for some streams and it doesnt work at all for some other streams. Logcat doesn't give much useful information to me. I am testing on HTC Hero (Android 1.5).

If I hook the completion and buffer events I see the audio gets a complete event but it keeps buffering. Is there anything wrong with the code below? Should I be able to stream the the audio streams below? Is there a complete example somewhere of a working radio streaming?................

View 5 Replies View Related

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 :: 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 :: Mp3 Files <=0.34 Secs Not Playing On Droid X Using MediaPlayer

Jul 16, 2010

Getting reports that mp3 files <= 0.34 secs in length, are not played (or, at least, inaudible) on the Droid X. Works fine on other devices I've tried (e.g. Nexus One, Hero, G1)

All files longer than 0.34 secs are working fine. I've tested this with about 100 files (mixture of short and long) and the correlation is 100%.

View 4 Replies View Related

Motorola Droid X :: Downloaded A New Ringtone And Setting It Up As A Default Ringtone

Sep 13, 2010

Trying to help a friend with his Droid. He downloaded a ringtone from the Verizon site and he is trying to set it up as his "RINGTONE". Can someone please walk me through this.

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

HTC EVO 4G :: Help People Default Ring Keep Using Phone Default Ringtone

Jun 20, 2010

I have the new HTC EVO 4 and I have certain ringtones set for different people, but my phone keeps playing my default ringtone I set for my phone, How do i fix this.

View 3 Replies View Related

Android : Ringtone Wont Stop Playing / How To Fix?

Feb 26, 2010

I currently start a Ringtone on Android and it plays fine. However when I try to stop the ringtone it doesn't stop or atleast doesn't stop straight away, it will keep in playing until it just plays out.

View 1 Replies View Related

Android :: How To Handle Alarm Clock & Alarm Reciever Broad Casting To Pause Playing Mediaplayer

Jun 22, 2010

I am using service class to play the mp3 file using media player object on Android platform, problem is, i am not able to handle the alarm interruption.When any previous set alarm clock reach to it's alarm time it starts to play in parallel with mp3.I want that mp3 should become paused and after alarm it again start to play,same thing should happen with snooze.

View 1 Replies View Related

Android : Looking For A Default Ringtone?

Sep 30, 2010

I have a buddy with a Hero that had a ringtone of a annoying little guy going" ring" "ring". He said it was a default ringtone, but I can't find it anywhere. Can someone point me in the right direction?

View 4 Replies View Related

Samsung Moment :: Don't Get Custom Assigned Ringtone Playing When Someone Calls

Nov 17, 2009

Once in a great while, I don't get the custom assigned ringtone playing when someone calls me. Anyone else?

View 2 Replies View Related

Motorola Droid X :: Playing Songs On SD Card As Ringtone Alert Automatically

Sep 28, 2010

It started last night. I got an email and "Glory Days" starts playing after the phone vibrated. I got an email and some other song started. This afternoon I get a call and Dr. Dre starts playing!
In every case, this was not the set ringtone, nor even in the ringtone list! These are songs from my SD card! - What the heck! Any idea how this could have happened? If it was all my SMS or email or calls, I would say its an app, but its been Everything!

View 4 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

Nexus :: What Is The Default Ringtone?

Nov 12, 2010

What is the default nexus one ringtone? Mine seems to be lost. Also, can someone upload it or knows where I can get it again?

View 1 Replies View Related

HTC EVO 4G :: Default Ringtone Selector?

Sep 26, 2010

I accidentally clicked use as default and selected the standard ringtone package. I would like to clear the default for this so i can use custom ringtones again but cannot for the life of me find what default i need to clear to bring that dialogue back up to choose another option. Rooted running fresh 3.3 and launcher pro if that matters. Anyone got any insight i have tried clearing settings data and numerous others to no avail

View 3 Replies View Related

HTC EVO 4G :: Ringtone - Default Plays For Everyone

Nov 22, 2010

I have a default ringtone for my contacts. That's all well and good and it will play the correct ringtone.

Now, the problem is, I go into my contacts and set custom ringtones for different people so I know it's them calling without even having to look. Probably about 10 or so people. The rest of the contacts, plus numbers not in my phonebook get the default.

All was well and good until last week. Now the default plays for everyone, no matter what. And when I went into my contacts and their contact page, it shows their ringtone as being the custom one I set but it's not playing. All the songs are still on my phone.

Only thing I can think of is I cleared data in ChompSMS, updated and downloaded a few apps. I've turned the phone on/off and took battery out but nothing.

View 6 Replies View Related

General :: Default Ringtone Changing

Oct 24, 2010

I keep having to change my default ringtone to my choice, for some unknown reason, it keeps getting changed back to default. I have rings extended and have changed most of my contacts ringtones and they have stayed, but whenever I go to settings and change it and then either shut my phone off, plug it in, whatever, it causes it to go back to default. I have tried ringdroid and that seems to only work as a ringtone maker, it will not show up in the menu to change tones like Rings Extended does. I also moved my ringtones to an appropriate folder for access. I also have adw launcher now (previously Launcherpro plus-which made no difference)

View 5 Replies View Related

Android :: Android Detect Which Ringtone Is Actually Playing

Jan 19, 2010

On Android, I'm having a problem trying to figure out which ringtone is actually playing (I'm not trying to detect the default ringtone, but the one actually playing as it may be different due to user setting a particular ringtone for a particular contact).I'm using the Ringtone.isPlaying() function as I cycle through (successfully) all the available Ringtones from the RingtoneManager. However none of them ever returns true to Ringtone.isPlaying()! Anyone have a clue what I am doing wrong? Here is the code sample that is definitely being run whilst the ring is playing

View 1 Replies View Related

Samsung Moment :: Unable To Fix Default Ringtone

Jul 16, 2010

My particular problem is that the phone is answering with a voice command that tells you who is calling if the caller is in my contacts list. I tried to find it listed in the list for ringtones to no avail. I've also checked a couple of different options but the phone is set to the voice announcement by default. Please help. My phone is rooted (I think), but currently I am on a looong learning curve to be able to troubleshoot these things on my own.

View 5 Replies View Related

HTC Droid Eris :: Cannot Select Default Ringtone

Jan 6, 2010

For some reason my Eris refuses to allow me to select a default ringtone. I can select a ringtone from the list and listen to it, but when a call comes in, I get 2 Step, the first ringtone in the list. I've rebooted and removed the battery, but neither of these fixed the problem. I called Verizon tech support and was told to enter Settings from Apps, which I did and it actually worked...once. Now, it's failing solid.

View 2 Replies View Related

Media :: Default Ringtone Maker On Eris?

Jul 3, 2010

I had to do a factory reset on my Eris. Kept getting the "The process com.google.process.gapps has stopped unexpectedly" error and nothing but the reset worked. I "lost" my ringtone app and I SWEAR I saw somewhere that Eris had a default ringtone maker app so there was no need to DL one. Can someone point me in that direction, or am I loosing my mind?

View 2 Replies View Related

HTC Incredible :: Default Ringtone And Notification Sounds

Jun 28, 2010

My default ringtone and notification sound won't stay set after powering off. Anyone have any ideas as to what might be causing this?

View 4 Replies View Related

HTC Incredible :: Ringtone Keeps Changing Back To Default

Jul 15, 2010

Hey guys, my ringtone keeps changing back to the default ringtone and its really annoying. It happens everyday, and I haven't hooked up my phone to my computer at all. I'm using a song from "my music" as a ringtone.

View 2 Replies View Related

HTC Desire : Way To Change Default Incoming Ringtone?

May 25, 2010

On my Desire I have changed my default incoming ringtone (in Settings> Sound & Display> Phone ringtone, click Ok) and when I go back in to settings the change has been saved, but for some reason when I receive a call I still only get the original impatient 'ringring' tone. The same happens even if I set the tone for a contact.

Has anyone else had this issue and know how to resolve it?

View 7 Replies View Related

General :: Extending Default Length Of Ringtone?

Jan 28, 2012

Is there a way to extend its lenght? No matter how long a ringtone is, the device keeps playing it from beginning as long as it arrives at i.e. 15 seconds (cannot remember the exact time elapsed).

View 1 Replies View Related

Samsung Moment :: Set Ringtone To Default / Need To Change Back

Aug 10, 2010

I accidentally set to select default ring tone and I need to change it back to where I can select the folder. How do I do that?

View 2 Replies View Related







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