Set ringtone from raw resource?

by Bryan Vincent » Mon, 16 Nov 2009 12:52:13 GMT

Sponsored Links
 So I'm having a hard time setting a ringtone from a raw resource. My
code is below. Any help would be much appreciated.

RingtoneManager.TYPE_NOTIFICATION, Uri.parse("android.resource://
net.thebosskey.gijoepsasoundboard/" + this.resource));

However, when I play back the default notification sound using the
line below, it is not my sound.

I know the uri for my sound is correct because the following line
plays it:
RingtoneManager.getRingtone(getApplicationContext(), Uri.parse
("android.resource://net.thebosskey.gijoepsasoundboard/" +

What am I doing wrong?


Set ringtone from raw resource?

by Open » Fri, 18 Dec 2009 07:38:46 GMT

 Did you solve this problem?

I'm having the same trouble when using a 2.0 emulator.  The Ringtone
manager doesn't play my raw resource sound, it plays the default phone


Sponsored Links

Other Threads

1. does cupcake recognise (anti)clockwise rotatiions of the device

I was told that Cupcake distinguishes both clockwise and
anti-clockwise rotations of the device and that it sets UI layouts
accordingly. Is this true? Or have I misunderstood something?

Also, what happens when the device is flipped upside down? Does
cupcake deal with it at all?



2. Webview not working like in Chrome

Hi guys,
I'm trying to make an android app, working with Facebook.

The first step to do that (after creating a new facebook-app on
facebook) is asking access to the user's informations.

We can do that from this url :[your

You're going on this page, giving your account information, allowing
the app, and facebook is giving you a token key. Then, the token key
is used by the application to get informations.

So I'm loading this page on a WebView, with a EditText under it, and a
button. You have to enter your token key on this EditText, then
clicking the button.

I'm having trouble with the WebView. First of all, we have to connect
two times to Facebook. Then, we're clicking on the "Generate" button
(on the facebook page), but it's still loading this page again and

I tried it on the Chrome navigator, and it works just fine!
I just don't get it! Maybe someone already had the problem and could
help me.

Here's some of my code :

the .xml view:

the .java file:

WebView webview;
webview = (WebView) findViewById(;
webview.setWebViewClient(new FacebookWebViewClient());


private class FacebookWebViewClient extends WebViewClient {
        public boolean shouldOverrideUrlLoading(WebView view, String
url) {
            return true;


and of course, on the AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />

Does anyone have any ideas?

3. What do people think of Cupcake?

4. Help required to get Android userland to boot on Gumstix Overo (TI OMAP 3503) + Palo43 LCD expansion board

5. Help required to get Android userland to boot on Gumstix Overo (TI OMAP 3503) + Palo43 LCD expansion board

6. using the ARM toolchain on FreeBSD to compile a .so for Android

7. How to start Porting