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.

Android :: How to Receive Broadcasts of Ringer Mode Action?


Android :: Cannot Receive Broadcasts For Outgoing Calls

Aug 10, 2009

I have started developing a tool, which should react on an outgoing call or sms and also to be started at boot time. The start at boot time does work properly, but I'm not able to receive the broadcasts for the outgoing calls.

Who can tell me, what is wrong with my code? For this, I added two receivers in my manifest and implemented the broadcast receivers:
manifest.xml: <receiver android:enabled="true" android:name=".BootUpReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver>
<receiver android:name=".TelephoneViewer" android:enabled="true" android:exported="true"
android:permission=""> <intent-filter> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<action android:name="android.intent.action.PHONE_STATE" />
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter> </receiver>
TelephoneViewer.java: public class TelephoneViewer extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
Log.d(this.getClass().getSimpleName(), "Telephoneviewer.onReceive()");
Toast.makeText(context,"TelephoneViewer.onReceive()", Toast.LENGTH_SHORT).show(); }

View 4 Replies View Related

Android :: Cannot Receive Broadcasts For Package Intents

Oct 20, 2009

I am trying to register a Broadcast Receiver to receive broadcast events for the package events. Following is the code and my receiver in the manifest file. The log statment never happens, but I can clearly see the same broadcast firing for "HomeLoaders" (the Launcher) debug statements.

public class IntentListener extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.i("INTENT LISTNER:", intent.getAction()); } }

<receiver android:name="IntentListener" android:enabled="true" android:exported="true">
<intent-filter> <data android:scheme="package"></data>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_CHANGED"></action>
</intent-filter> </receiver>

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 :: 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

LG Ally :: Ringer And Vibrate Mode Together

Sep 27, 2010

Back when I had my LG Envy, I could set it to rign and vibrate at the same time, cause at time I am in a load area and cannot hear the ring. Can I set my Ally to Ring and Vib at the same time?

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

HTC Hero :: Ringer Volume Often Goes To Silent Mode

Dec 9, 2009

I use Ear to set my ringer profile and it seems to work great. However the ringer volume often goes to silent mode, because I unintentional push the ringer volume button and I miss the calls. Does anyone have a solution for this? Is it possible to turn of the ringer volume button on the Hero?

View 1 Replies View Related

Android :: Android: Ringer Mode Changed To Silent Doesnt Stop The Phone Vibrating

Apr 13, 2010

I'm trying to change the ringer mode of the phone to RINGER_MODE_SILENT when a call is incoming by using the following lines of code.

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

While the phone stops ringing it continue to vibrate although the documentation of RINGER_MODE_SILENT says it should also stop vibrating.

I'm using the SDK 1.6

UPDATE:

As I didn't find a solution yet, I tried to deactivate the vibration settings manually.

am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF );

But this also doesn't prevent the phone form vibrating when a call is incoming.

UPDATE 2:

Today I tried to solve the problem by canceling the vibration via a Vibration object.

Vibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vib.cancel();

Again, without success. Now I'm running out of ideas and asking myself if it is possible to stop the vibration at all.

UPDATE 3:

I've discovered another interesting fact when I've reread the documentation of the Vibrator class. The documentation says:

"If your process exits, any vibration
you started with will stop."

View 2 Replies View Related

Android :: Catch.intent.action.ACTION UMS CONNECTED Event

Nov 3, 2010

I want to show some notification when android phone is connected to system. I implemented BroadcastReceiver for listening to event android.intent.action.ACTION_UMS_CONNECTED in my application But it is not working. Is it possible to capture this event.

View 3 Replies View Related

Android :: Supplying Action / Data Where Filter Had Only Action

Oct 31, 2010

I thought that Action was preeminent during intent resolution and if the intent had the same action as the intent filter, it would be considered a match regardless of data, if the filter did not specify anything. So I was very surprised to find that supplying action+data where filter had only action, causes it to fail. In the code below, if you comment out line 47 so that data is *not* sent, only then it resolves correctly. To get it to work with the data (an id that is simply a String), what mime type should I specify in the intent filter?

View 11 Replies View Related

Samsung Captivate :: Vibrate Mode When Receive A Text Or Email?

Jul 30, 2010

I would like my phone to vibrate when I receive a text or email while it is in vibrate mode. It only does so when a call is being received. I can turn on "also vibrate" and it works, but when I am in normal mode it rings AND vibrates. Any way to make it work they way I want it?

View 7 Replies View Related

HTC Incredible : Set In Vibrate Mode - When Receive A Text Message Phone Does Nothing

Jul 13, 2010

Im have some troubles with my phone and vibrating. When my phone is set in the vibrate mode when i receive a text message my phone does nothing. In the messages app I have it checked off to vibrate when a message is received but still nothing..

View 4 Replies View Related

General :: Star B943 / JB 4.2.1 - Phone Will Never Go Back In Powersaving Mode When Receive Email / SMS

Apr 24, 2013

My phone: Star B943 quad core MT6589, linux kernel 3.4.5, JB 4.2.1

At the phone start, deep sleep mode works fine, but as soon as i receive an email or SMS, the phone will never go back in powersaving mode. Just as if the service crashed and the phone still "Awake". I've tested several solutions and apps:

- Deep Sleep Battery Saver: Failed
- One power guard: Failed
- Powersaving tweaks from Pimpmyrom: Failed

Of course i've checked if a service or apps aren't involved in the problem, but there is nothing. I've checked with Betterbatterystats, wakelock detector...Deep Sleep mode just crash and never restart . And we are a several people in this case...

i imagine the gotosleep void in powermanager can't do his job

"public void goToSleep (long time)

Added in API level 1
Forces the device to go to sleep.

Overrides all the wake locks that are held. This is what happens when the power key is pressed to turn off the screen.

Requires the DEVICE_POWER permission.

The time when the request to go to sleep was issued, in the uptimeMillis() time base. This timestamp is used to correctly order the go to sleep request with other power management functions. It should be set to the timestamp of the input event that caused the request to go to sleep.

See Also
userActivity(long, boolean)
wakeUp(long)"

View 2 Replies View Related

Android :: SMS Broadcasts And Logs

May 16, 2009

I want to know whenever someone is called, calls, smsed or smses. I figured for the calls I'd use the phone state change to trigger when I should check the CallLog provider again. I couldn't see any direct way of getting broadcasts from the CallLog. Did I miss it?

For SMSes I'm having more trouble. I'd like to know whenever and SMS is sent or received. Being able to receive STATUS_ON_SIM_READ and STATUS_ON_SIM_SENT would be great, but from what I've read in the Sms Manager that would depend on the sending application. I can't seem to find any evidence of a default one that android places when it sends. I also couldn't find an sms log provider or anything similar.

View 2 Replies View Related

Android :: Receiver Not Receiving Broadcasts From Another App?

Jul 5, 2010

App A has this Broadcast Receiver in its manifest (within <application>): Code...

View 1 Replies View Related

Android :: How To Catch Screen On / Off Broadcasts?

Jul 17, 2009

How can I catch SCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed.

View 10 Replies View Related

Android :: Targeting Broadcasts To Specific Receiver

Jul 3, 2009

I am trying to get the intent "android.intent.action.BOOT_COMPLETED" sent only to the receiver "com.android.mms.transaction.MmsSystemEventReceiver" as this triggers the sms notification to be updated and removed if there is no longer any unread sms's. The issue I have is I need to make sure the broadcast is only sent to the class above. If it goes to other receivers the phone could end up in an unknown state or something strange. The code below does not seem to work.

Intent intent = new Intent(); intent.setAction("android.intent.action.BOOT_COMPLETED");
intent.setClassName("com.android.mms", ".transaction.MmsSystemEventReceiver");
activity.sendBroadcast(intent);

This code does work but since it goes to all receivers I have noticed some errors starting to show up in logs etc.
Intent intent = new Intent();
intent.setAction("android.intent.action.BOOT_COMPLETED");
activity.sendBroadcast(intent);

View 7 Replies View Related

Android :: Broadcasts Receivers And Permissions In Two Applications?

Sep 15, 2010

I have two applications, one of which (B) implements a broadcast receiver. The application (A) which sends the broadcast, binds a permission to it which the receiver (B) shall possess. The problem is now: If I install the receiver (B) first and the sender (A) afterwards, the receiver will never receive the broadcast. I assume this happens because the installation of the receiver somewhere fails when it comes to the "uses permission" part of the manifest (because this permission is not yet registered/defined).

However, this issue should be resolved as soon as the sender (which defines the permission in the manifest) is installed, but unfortunately isn't. It does not even help to re-install the receiver. The only way to resolve the issue is to completely uninstall the receiver application and do a fresh install. Is this behaviour intended ("not a bug, a feature")?

View 3 Replies View Related

Android :: Alarm Clock Broadcasts Any Intents?

Feb 11, 2009

Does the Alarm Clock broadcast any intents? I would like to be able to have my application automatically launch after a person's alarm clock goes off, and they press "dismiss" (rather than "sleep"). I assume that would require a receiver looking for a broadcast of some kind.

View 2 Replies View Related

Android :: Doing Broadcasts With HTTP Server Push Over WiFi?

Apr 2, 2010

We are designing a system with a PC base station and 100 Android mobiles communicating over WiFi. They will use XLM-RPC as the method of mobile to base station communication. However, sometimes the base station needs to broadcast a message to all mobiles. Should we use "http server push" for this, i.e., have the base station leave the connections open to all the mobiles? Is there a better way? Publish-subscribe is possible, but doesn't seem mature on Android yet.

View 1 Replies View Related

Android :: Broadcasts As Communication Path Between Views And Activity

Apr 15, 2009

I have custom view and once some action occur in it (say touch/key event) I'd like to call some code in my activity. My question is if broadcasts (intent filters/broadcast receivers) are good communication mechanism for such thing? If not, what is normal/android preferred way to do it?

View 5 Replies View Related

Android :: Alarm Manager Broadcasts Canceled When Application Killed?

May 15, 2010

I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things. If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens. Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation? If it helps my manifest is:

<!-- receivers for AlarmManager -->
<receiver android:exported="true" android:label="Shift roster updating calendar."
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar" >
</receiver> <receiver android:exported="true" android:label="Shift roster checking alarm."
android:name="com.skooter.shiftroster.backend.service.SetWakeup" >
</receiver>
and nothing esoteric is going on in the AlarmManager/BroadcastReceivers

View 1 Replies View Related

HTC Desire :: Vibrate Mode Doesnt Vibrate When Receive A Text

Jun 5, 2010

My phone when in vibrate mode doesnt vibrate when i receive a text, but does if i receive a call, all settings are as they should be for it to vibrate....

View 3 Replies View Related

HTC Droid Eris :: Turn Off Mobile Network And Connected To Wi-fi Can Receive Texts - Send/Receive Pics

Feb 22, 2010

If i turn this off while I am home or in my dorm and connected to wi-fi

can I
1) Receive Texts
2)Send/Receive Pics
3)Make Calls?

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







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