Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
intent filter to know when user change the volume
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Krebs  
View profile  
 More options Aug 28 2009, 4:07 pm
From: Michael Krebs <micha.kr...@gmail.com>
Date: Fri, 28 Aug 2009 13:07:51 -0700 (PDT)
Local: Fri, Aug 28 2009 4:07 pm
Subject: intent filter to know when user change the volume
hello, i want to develop an application who allow the user to change
the brightness of the screen when he change the volume (in same time
he can choose volume or brightness in all application). In src of
class AudioManager i've see this :

 /**
     * @hide Broadcast intent when the volume for a particular stream
type changes.
     * Includes the stream and the new volume
     *
     * @see #EXTRA_VOLUME_STREAM_TYPE
     * @see #EXTRA_VOLUME_STREAM_VALUE
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String VOLUME_CHANGED_ACTION =
"android.media.VOLUME_CHANGED_ACTION";

so i create a Broadcast Receiver to capture this event but nothing.
Anybody know how i can do this ? thanks.

PS : excuse me for my bad english but i'm french.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Krebs  
View profile  
 More options Sep 1 2009, 4:50 pm
From: Michael Krebs <micha.kr...@gmail.com>
Date: Tue, 1 Sep 2009 13:50:20 -0700 (PDT)
Local: Tues, Sep 1 2009 4:50 pm
Subject: Re: intent filter to know when user change the volume
ok i've found that is impossible :

 private void sendVolumeUpdate(int streamType) {
        Intent intent = new Intent
(AudioManager.VOLUME_CHANGED_ACTION);
        intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE,
streamType);
        intent.putExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE,
getStreamVolume(streamType));

        // Currently, sending the intent only when the stream is
BLUETOOTH_SCO
        if (streamType == AudioManager.STREAM_BLUETOOTH_SCO) {
            mContext.sendBroadcast(intent);
        }
    }

the intent is not send !


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »