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
May 18, 2009
Is there any way to tell if an app is currently using the speaker (playing music or generating other sounds)? Specifically, I'd like to detect if an alarm clock is going off (not only the one that comes with the system, but any alarm clock), but I'll settle for simply knowing if any sounds are coming out of the speaker.
View 2 Replies
View Related
Aug 26, 2010
My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a video at any point, they can do so without audio conflict.
One solution might be to listen for a broadcast which states when an application begins using the AudioManager. Does such an Intent Action exist? Edit: As in the answer provided below, there appears to be a method of detecting the loss of audio focus in 2.2 with AudioManager.OnAudioFocusChangeListener.
View 1 Replies
View Related
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
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
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
View 2 Replies
View Related
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
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
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
Dec 10, 2009
I purchased my moment about 2 weeks ago and have been having fun figuring it out however there are some areas where I am having problems.
1. When you want to attach a document it selects the picture folder/area, how do you browse instead of being forced into that area.
2. I downloaded ringtone app and have found the app quite useful, the problem I am having is, the ringtones I have created don't show up in all the ringtone areas of my phone, what needs to be done to correct this.
3. The basic user guide that comes with the phone says there is an app I can download called samsung new pc studio. When I call sprint or samsung they say this app is not available or can't be used by a casd(the u.s. standard, I think casd is right), they say this software is only for the other standard, I did find this app on the web. Is what sprint and samsung saying true if not can I use the ones I found on the web.
4. If you could choose only ten apps to have(free)which ones would you choose?
View 3 Replies
View Related
May 17, 2010
I used the htc ringtone trimmed for one of the song in my music library on my phone and I'm sorry if there is already a thread for this but how are you able to delete these ringtones when you no longer want them? The program its self works fine for making ringtones but I cannot find anyway to delete them. I even looked in Astro. If someone doesnt mind could they please lend some advice on this. I've searched in the forums and I havnt found a solution to it.
View 4 Replies
View Related
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
Aug 18, 2010
My fiance upgraded from LG Voyager to Droid 2. She wanted her old ringtones from the Verizon Media store so she downloaded them. When she stored them they were given default names. I was able to make the appropriate ringtone associations, except for voicemail. I have 2 questions:
1. How do you set a ringtone for voicemail? When I run the standard voicemail app (Verizon) I cannot being up a menu.
2. How do I change the name of a ringtone file?
View 4 Replies
View Related
Jul 19, 2010
Trying to set a mp3, what's the difference?
View 2 Replies
View Related
Jan 28, 2010
Hey all, so I just got a Samsung Galaxy finally in the mail. It took long enough to figure out how to put music on it, then use my music for ringtones. But when I am in Settings for Notification Ringtones, I do not see the mp3 I added but only in Calling Ringtones. Why is this? I want to use the same ringtone for notifications too!.
View 1 Replies
View Related
Aug 11, 2010
I want to use the ringtone that comes stock on the phone called "New Player" as a notification tone for text messages. Any way that I can do so?
View 1 Replies
View Related
Sep 11, 2010
After applying SRE v1.2.3 (…… SRE v1.2.3… | Root + OC 1.2GHz + MobileAP + USB Tether + LagFix - xda-developers), my notification ringtone sucks. I have changed it many times but it still plays the "cloud" ringtone. Any ideas?
View 2 Replies
View Related
Jun 5, 2010
Is there a way of getting the speed at which the device is running?
View 5 Replies
View Related
Apr 29, 2010
I need to catch event when a key is held down, not pressed down and but held for some time, equivalent to long click but for the key. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To un subscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en.
View 2 Replies
View Related
Dec 11, 2009
I have ported the Android to a x86 platform. And i want to detect the USB plug-in.But follow the information about the android.intent.action.MEDIA_MOUNTED in the SDK's DOC, i can't receive the event of the USB's plug-in. i have checked my code and it can receive the other event ( ps:intent action) .
Besides, in the CLI, i could mount the USB device to /sdcard but it couldn't mount automatically. have seen some source code about the mount and mountlistener and it should be effective. my SDK's version is 1.5.
View 7 Replies
View Related
May 9, 2010
I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using 10.0.2.2 instead of a public URL to run against a development server automatically.) What is the best way to detect when an Android application is running in the emulator?
View 9 Replies
View Related
Jun 5, 2010
I want to incorporate some Accelerometer code into a Android application im working and want to see if this is possible. Basically what I need is for the code to detect car acceleration motion. I am not wanting to determine speed with the code but just distinguish if the phone is in a car and has accelerated motion (Hence the car is moving for the first time). I have gone through many different accelerometer applications to see if this motion produces a viable profile to go off of and it appears it does. Just looking for something that popups a "Hello World" dialog when it detects your in the car and its moving for the first time down the street. Any help would be appreciated and a simple yes or no its possible would work. I would also be interested in compensating anyone that is capable of doing this as well.
View 2 Replies
View Related
Jun 6, 2010
I need to implement HorizontalScrollView which is scrolled to predefined positions (similar to Home behaviour). It works with slow gestures, but does not work with neither flings nor arrow key press.
I hooked to View.onScrollChanged() and it is called when scrolling happened, but I can't determine when scrolling animation ends.
In theory there should be a way to say that fling movement is over. Is there such API?
View 1 Replies
View Related
Aug 10, 2010
How to detect quickly if a specified URL contains an image in Android?
I have link of type http://foo.bar/w23afv so naive approach like checking end of URL string won't work here.
View 1 Replies
View Related
Sep 8, 2010
My application requires users to hold down the trackball in order to access an advanced menu.Not all phones have a trackball, however, so I need to remove this requirement for such phones.Is there a way to detect if the phone has a trackball?
View 1 Replies
View Related
Apr 21, 2010
Is there a way to get a system notification when an app has been uninstalled?I would like to maintain a table of all clients' info currently using my app. However, that seems impossible if there is no way to detect this event. The first solution I can think of is to have an always running service in the background listening for android.intent.action.PACKAGE_REMOVED. But then would that service be killed once the uninstallation process has ended, or would it be stopped just before the process has kicked off? Also even if this is a solution it's has the potential to put off a lot of people when they realise that part of the app is running in the background.
View 2 Replies
View Related
Jun 5, 2009
I've asked "how to detect home screen" before. I'm still searching. I noticed when I press "home" button on Android emulator, I got this statement in catalog so I went to ActivityManager to see if I can find a clue there. Here is my findings: 1. I can not instantiate ActivityManager because it's constructor is not public, and it's not a singleton 2. it has a function called: getRunningAppProcesses sounds promising -- would it give me all the running processes? 3. since I can not instantiate ActivityManager I tried to use one of the derived class: RunningAppProcesseInfo to see if I can use it's parent methods: getRunningAppProcesses. Nope.
View 5 Replies
View Related
Aug 15, 2010
I want to program a function that the toast exist when there is nothing in the "edittext" box (id / password), but it dosen't work.
View 1 Replies
View Related
May 6, 2009
I'm trying to detect when new videos are taken. I'd succeeded to detect new photo using the intent filter action "com.android.camera.NEW_PICTURE" in a receiver but I don't know how I can detect new videos.
View 2 Replies
View Related
Aug 10, 2010
One of my users let the cat out of the bag and told me they were using one of my free apps, which is monetized by ads, but they were blocking the ads with an ad blocker. They told me this mockingly, as if I can't do anything about it.
Can I do something about it? Is there a way to detect that ads are being blocked?
View 4 Replies
View Related