Using raw resource sound file as Ringtone

by Maur铆cio » Mon, 14 Dec 2009 05:32:37 GMT


Sponsored Links
 I have a problem setting a ringtone from a resource in my app:

Uri uri = Uri.parse("android.resource://com.package.app/" +
R.raw.sound1);
RingtoneManager.setActualDefaultRingtoneUri(this,
RingtoneManager.TYPE_RINGTONE, uri);

I've noticed also some people had the same problem but got no answers.
Do any of you guys have any idea of how making this work? (without
having to copy the file to the sdcard)

Cheers

--



Using raw resource sound file as Ringtone

by Open » Fri, 18 Dec 2009 07:31:36 GMT


 I was able to set a ringtone for my app like this in Android 1.6, but
it does not seem to work in 2.0.




--


Sponsored Links


Other Threads

1. How to change Orientation for two controls in one activity:

Hi,

I want to have two orientation mode for two things in a single activity. I have 
a VideoView which needs to be in landscape mode and a dialogbox which needs to 
be in portrait mode. But i forced settting 
android:screenOrientation="landscape" in manifest xml file. So it is showing 
videoview and dialogbox also in landscape mode, which i don't want. 
How to show videoview (in linear layout) in landscape mode and dialogbox in 
portrait mode when both are in one activity?


-Martin Prabakar.



      
--~--~---------~--~----~------------~-------~--~----~

2. Waiting for HOME ('android.process.acore') to be launched...

I got this message when trying to run the emulator, android freezes on
the 'ANDROID' loading screen.

The cause, I think, is that if you close the emulator by just clicking
the window's [x] as I did previously (I'm using Ubuntu), then the
emulator doesn't close properly and doesn't release its hold of the
android debug port.

A workaround for this bug is:

1. Exit eclipse.
2. Kill all the eclipse and java processes. I had to kill -9 the java
ones.
3. Restart eclipse and run the emulator again.

--~--~---------~--~----~------------~-------~--~----~

3. Does anyone know how to set G1 use Wi-Fi with static IP?

4. Trying to Download a Web Page Using java.net

5. Android SDK Content Loader - can i stop it? =D

6. Error running android programs with netbeans 6.7.1 in asus n10

7. WebView + Cookie Problem