Android :: Setting Ringer From Resource?

Jul 15, 2009

In my application I want to set the ringtone to one of the resources in my project. I have not got this to work, yet.

I'm setting the default ringer to a resource in my application with the following code.

CODE:...............

I can play the resource via the RingtoneManager with this code:

CODE:........

This plays the sound I would expect.

However, if I ask the RingtoneManager to play the default ringer, it plays the default android ringer. Here is the code I'm using to play the default ringer:

CODE:........

The question is... Why is the "setActualDefaultRingtoneUri" method call not setting the default ringer?

Android :: Setting Ringer From Resource?


HTC Magic :: Ringer Volume Keeps Setting Itself

Nov 5, 2009

A bizarre problem has developed on my Magic (Vodafone, 1.6) whereby the Ringer volume keeps setting itself to the lowest setting. Five times today I've missed a call, and upon pressing volume up, noticed the Ringer Volume was on zero. I set it back to about 50% and locked the phone again. After it had happened about 3 times, I took to repeatedly checking the phone, and it seemed that the volume was remaining where set, until I missed a call again and this is where it gets weird: Every time a call comes in, the ringer volume sets to zero and I miss the call!

How bizarre is that? I have checked the volume repeatedly to find it was ok, then I miss another call and I find the volume on zero again. I have switched the phone off and on several times without the problem going away. I don't have any apps or widgets installed that alter the ringer volume, the only thing I have which is along these lines is "Smart Vibrator". Oh and it doesn't matter how I set the volume, with the buttons on the side of the phone or through the Settings, the problem still occurs. Does anyone have any idea what's going on? Because this is driving me insane and the phone has nearly gone across the room on several occasions!

View 1 Replies View Related

Android :: Setting An Image View Resource As Drawable

May 2, 2010

I am trying to create a drawable in code and change the color based on some criteria. When I try and set the Drawable as the background of the ImageView it displays but won't let me set any padding. I realized I need to set the ImageView image via the setImageDrawable() function in order to be able to set the padding. The problem I am running into is that when I set it via the setImageDrawable() function nothing is displayed.

Here is what I have written:
<?xml version="1.0" encoding="utf-8"?>
ImageView icon = (ImageView) row.findViewById(R.id.icon);
ShapeDrawable mDrawable; int x = 0; int y = 0;
int width = 50; int height = 50;
float[] outerR = new float[] { 12, 12, 12, 12, 12, 12, 12, 12 };
mDrawable = new ShapeDrawable(new RoundRectShape(outerR, null, null));
mDrawable.setBounds(x, y+height, x + width, y);
switch(position){ case 0: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 1: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 2: mDrawable.getPaint().setColor(0xff00c000); //Green break;
case 3: mDrawable.getPaint().setColor(0xff00c000); //Green break;
case 4: mDrawable.getPaint().setColor(0xff0000ff); //Blue break;
case 5: mDrawable.getPaint().setColor(0xff0000ff); //Blue break;
case 6: mDrawable.getPaint().setColor(0xff696969); //Gray break;
case 7: mDrawable.getPaint().setColor(0xff696969); //Gray break;
case 8: mDrawable.getPaint().setColor(0xffffff00); //Yellow break;
case 9: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 10: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 11: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 12: mDrawable.getPaint().setColor(0xffa020f0); //Purple break;
case 13: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 14: mDrawable.getPaint().setColor(0xffffd700); //Gold break;
case 15: mDrawable.getPaint().setColor(0xffff6600); //Orange break;
} icon.setImageDrawable(mDrawable); icon.setPadding(5, 5, 5, 5);
This results in a space for the ImageView but no image.

View 1 Replies View Related

Android :: Setting Webview Background Image To Resource Graphic

Aug 11, 2009

I'm trying to set the background of a webview to a drawable image resource in Android.From the sdk it seems something like this would work but it doesn't.

View 5 Replies View Related

Sprint HTC Hero :: Lost Locale - How To Manage Ringer Setting

Mar 8, 2010

Had Locale and used a basic setting to turn my ringer off during work based on time of day...put it back on after work.

Is there anything in the marketplace that would work for me? I've read many bad reviews on Locale and don't want to risk it for $10. Not averse to paying for a good app that someone can vouch for!

View 5 Replies View Related

Android :: How To Use Resource Within A Custom Xml Resource File?

Aug 3, 2010

I have an XML resource file:
<resources> <section>
<category value="1" resourceId="@xml/categoryData1" />
<category value="2" resourceId="@xml/categoryData2" />
<category value="3" resourceId="@xml/categoryData3" />
</section> </resources>
Using XmlPullParser, on the START_TAG, I can use:
int value = parser.getAttributeIntValue(null, "value", 0);
to get values 1, 2, 3...however:
int resourceId = parser.getAttributeIntValue(null, "resourceId", 0);
doesn't work...it just yields the default value 0, or whatever I change the default value (3rd parameter) to be. Does anyone know what I am doing wrong or if this is possible?

View 1 Replies View Related

Android :: App For Louder Ringer

Oct 12, 2010

Is there a app for making your ringtone louder? I have the Epic and its not loud enough for my deaf ears to hear!

View 4 Replies View Related

Android :: Only Plays Default Ringer

May 13, 2010

I have SCOURED this forum - and others - in search of an answer for my problem and have simply not found it. I accidently set up a ringtone to be the default ringer. Which is no big deal, except that now none of my custom ringers work. No matter who calls, it plays the default ringer. I have tried to change the custom ringer to something else (contact, options - and it says the correct name...plays the correct ringer when demo-ed), and change it back to what I wanted originally - didn't work.

Tried changing the default ringer and repeating the above - didn't work. Tried using two different ringer apps from the market - didn't work. I do not use any type of task killer, and don't know the slightest thing about rooting or anything of that nature. I restarted the phone several times. Also took the battery out while still on...didn't work. After all that...still rings the default ringer EVERY time. I'm at a total loss.

View 2 Replies View Related

Android :: No Sound From Ringer / Alarm

Aug 16, 2010

This morning when my alarm was supposed to go off, it didn't. I happened to wake up. I could see the alarm icon flashing on the screen. Later I set a new alarm and no sound. I tried dialing my phone and got no ring tone. I checked on the settings and everything was correct. No silent mode, etc. So then i shut the phone down and restarted it. Then everything was working fine. But..the alarm sound not working or phone sound not working is not good. You could not tell its not working until its too late.

View 1 Replies View Related

Android :: Set Ringer To Mute During Certain Times?

Nov 17, 2010

I know there are apps that can set the ringer to mute during certain times of the day. However, I am wondering if there is an application that will allow me to tell the phone to not ring for the next hour (or any set amount of time). The problem is that periodically I will go to an unscheduled event in when I want to mute the phone, but inevitably forget to unmute later. I'd like to quickly choose to mute for an hour and then it automatically unmutes after an hour...

View 12 Replies View Related

Android :: Notification And Ringer Volumes

Aug 12, 2010

The Android phones have a setting that allows you to force the notification volume to match the ringer volume, I can't seem to find that setting anywhere in SDK, can someone help me find out how to get and set it that specific setting?

View 1 Replies View Related

Android :: Need An App To Sync Ringer / Notification Volumes

Sep 15, 2010

I'm really frustrated with this. If I adjust the ringer volume with the volume rockers on the side of the phone, it only applies to phone calls. Notification volume requires going into settings and adjusting by itself. Is there an app that forces all volumes to sync with the ringer volume?

View 2 Replies View Related

Android : Way To Silence Ringer Depending On Location?

Oct 13, 2009

My job takes me to the courthouse several times a week. If you forget to silence your ringer and the phone rings, the judge takes the phone and you have to travel back to the courthouse at the end of the day to recover it. The judge also gets really really mad and gives lots of grief. So I need a failsafe way to automatically turn off the ringer while in the courthouse. I read this thread Set profile by GPS location about a program named Locale, but it indicated that if the phone loses the GPS signal, Locale will automatically revert the phone to the default profile or some other profile. I come from a Symbian phone where the phone would "learn" every cell tower ID in a given area and then set the phone's profile upon getting a signal from one of those towers. The profile would stick, regardless of losing the signal, unless and until it got a signal from a different tower which was not on the list it had "learned" from the location area. That is failsafe. Is there anything for an Android based phone which will silence the ring on a failsafe basis?

View 9 Replies View Related

Android :: Ringtones - Play Default Tone Whether Set As Ringer

Nov 26, 2010

I have downloaded three ringtones and none of them currently play what they are supposed to. They play a default tone whether they are set as the ringer or if they are selected directly from the ringtone list.

View 7 Replies View Related

Android :: Changing Ringer Volume - Audio Manager

Apr 18, 2009

I am trying to change ringer volume but I am a bit confused. I can reach the volume_ring level by using the code:
String vr = System.getString(this.getContentResolver (),System.VOLUME_RING);

However it says in the explanation "Ringer volume. This is used internally, changing this value will not change the volume. See AudioManager." How can I change Ringer Volume? What should I do?

View 3 Replies View Related

Android :: Ringer Volume Gets Muffled Automatically After 5 - 10 Seconds

Jun 11, 2010

I am facing a weird behavior these days with my new HTC legend. My ringer volume gets muffled automatically after 5 or 10 sec on getting a call. I have already disabled "quiet ring on pick up" feature. Then also this problem is coming up. I have googled this n come to know that i am not the only one. Some folks have found a workaround that if they choose "WCDMA only" network in network settings then this problem is not there. But I don't have 3G connectivity in my area. What should I do? I have note down the logs just after this problem. It shows some errors:-

W/CallNotifier(144)
CallerInfo query took too long,manually starting ringer
CallerInfo query took too long,falling back to default ringtone
E/jBtlAgHandler(144)
"JBtlAG context is disabled"
E/BT HS/HF(144)
mjBtlAgHandler.sendRing() failed

View 1 Replies View Related

Android :: How To Setup Ringer Mode With Days / Time?

Oct 4, 2009

Kids, while they are at school, wish to have the phone in silent mode. All other time, would like to have the ringer on. Is it possible to program the ringer mode with days and time? Is it a challenge to Android or the device manufacturers or for Google? Anyway, my kids will be the first users, if it is available.

View 4 Replies View Related

Android :: How To Receive Broadcasts Of Ringer Mode Action?

Jul 19, 2010

I have the following broadcast receiver:
public class MyRingModeReceiver extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
Logger.iLog("In my Receiver"); } }

I then have a service that onCreate does the following:
IntentFilter filter = new IntentFilter();
filter.addAction("android.media.RINGER_MODE_CHANGED");
registerReceiver(new MyRingModeReceiver() , filter);

When I place a call to the emulator and use the volume keys to modify (silence) the ringer
nothing happens.

View 1 Replies View Related

Android :: Accessing Ringer Mode Does Not Work Inside Service

Jul 9, 2010

I have an application that creates a notification with sound when a specific text comes in. To do this, I detect the current ringerMode, change the ringerMode to normal, play the sound, and then quickly return the ringer back to its original setting.

View 1 Replies View Related

Android :: Tasker Unable To Reliably Detect Changes To Ringer Volume

Aug 1, 2010

About six months ago I installed RingGuard to prevent accidental changes to my ringer volume by accidental presses of the volume rocker. I uninstalled it about 15 minutes later, as (at that time) it prevented Locale from changing the ringer volume. I am now using Tasker, and it is unable to reliably detect changes to the ringer volume. Is it possible that something left over from RingGuard is preventing Tasker from seeing these changes? If so, how would I determine if this is what's happening?

View 2 Replies View Related

Android :: Changing Ringer Mode To RINGER_MODE_SILENT Doesn't Prevent From Vibrating

Apr 15, 2010

I've got some problems muting the phone via code. The app I develop should mute the phone when a call comes in. This means it should not ring and vibrate at all. My first attempt so archive this was setting the AudioManager Ringer Mode to RINGER_MODE_SILENT using the following code.

AudioManager am = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE); am.setRingerMode(AudioManager.RINGER_MODE_SILENT);

While the phone stops ringing it continues to vibrate although the documentation of RINGER_MODE_SILENT says it should also stop vibrating. My second attempt was to switch off the vibration mode manually. am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF ); But this also doesn't stop the phone vibrating.

View 3 Replies View Related

Android :: Modify The Ringers - Good Basic/office Type Ringer?

Nov 18, 2010

Is there a way to modify the ringers that come stock with android? for instance, if i select the ringtone "standard 4", it sounds like a very basic ring.. but when you actually use it he pause between rings is ridiculously short and just makes the ringer completely obnoxious. is there a way to set how long the pause between rings is? if not, whats the best place to find a good basic/office type ringer?

View 2 Replies View Related

Android :: Resource ID

Sep 6, 2010

I am using the function decodeResource(Resources res, int id, BitmapFactory.Options opt).I am using it in the following way:

BitmapFactory.decodeResource(getResources(), R.drawable.image,opt);

My question is instead of using R.drawable.image which is an image in resdrawable folder, I want to use a image from sdcard.Is it possible? How to get the resource id of an image in the sdcard?

View 3 Replies View Related

Android :: Get Resource ID From Value

Oct 11, 2010

I do have a lot of language specific resources. There's one point in my Android apps where I do get a resource value and need to translate this value into the matching id. The value is not neccessarily in the language specific file for the current language (en/de/...). It's somewhere in there ... and it's unique.

After reading the docs and this thread "http://stackoverflow.com/questions/3476430/get-resource-id-by-passing-name-as-a-parameter-in-android" I thought that "getIdentifier(String name, String defType, String defPackage)" is the correct way to go but I can't get it to work. The result is always "0".

This code is part of an activity and I'm on Android 2.2.

Is it possible that Android doesn't take all resource files into account and searches just in the current language specific one?

For an example

CODE:....

To make things clear. I don't want to mis-use string resources as a database. It's only one part that occurs on very rare situations.

View 1 Replies View Related

Android : App - Ringer Profile Like Blackberry - Like Volume Number Of Rings Vibrates Led Blink

Nov 18, 2009

is there an app like blackberrys ringer profile, so u can set which notifications of how u want them to notify u like volume, number of rings, vibrates, led blink?

View 6 Replies View Related

Android :: Resource For Very New Beginner?

Jul 25, 2010

I will admit - I've never had a smart phone. Never. I was going to get one last year, but waited b/c I heard 2010 was 'the year of the smart phone' - and I'm glad I waited.Though I'd have to see it in person to know for sure, but I'm almost positive that DroidX will be my first smartphone. I'm VERY excited, but I want to make sure that I'm educated enough to use it for all it's worth (ie: my mom has had every iphone, but just leared to text message last month).Is there some place/book/thread/site that I can study which would tell me about smartphones from the very most basic all the way to the more advanced? I'm a smart girl, but I have to start somewhere!

View 1 Replies View Related

Android :: Can I Parse Uri From Resource?

Mar 18, 2010

When I use the first,app will crash in emulator but the second run well, how can I fix the first. Code...

View 1 Replies View Related

Android :: Resource IDs And SharedUserID

Jul 20, 2010

If I am not wrong with the way android:sharedUserId is intended to work, then my question is how to avoid overlapping resource IDs? appt seems to aways start IDs at the same initial value (i.e. drawables at 0x7f020000), so there will be sort of conflict or ambiguation. As for now I failed to get that cleared w/o digging in OS sources. Or I miss anything, like magic "undocumented" appt option (not that aapt is documented at all)?

View 5 Replies View Related

Android :: Resource In Conflict

Sep 4, 2010

My application has resource conflict problem. Did some investigation, seems like all the resources within the apk file are cached after they are loaded on demand. The cache is stored in Resources.java mDrawableCache. The key to retrieve the drawable from this cache is combining the data and assertCookie fields of TypedValue class. In my application, there are 2 resources, ex. a color background and image drawable, evaluated to the SAME key value.. So just wondering, how can it happen?BTW, I am using eclair SDK.

View 2 Replies View Related

Android :: Negative Resource Id Value

Sep 15, 2010

Is it possible that a resource id (such as a generated id for a string resource) can be a negative int?Often, when defining a method that accepts a resource id, I want the caller to be able to specify a "null" value.For primitives this is not possible, but I'm wondering whether "any negative value" may be a good approach? Alternatively I suppose it would be OK to specify the argument as an Integer and take advantage of auto-boxing.Thoughts?

View 3 Replies View Related







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