Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:07:30+00:00 2026-05-29T11:07:30+00:00

I have a ContentObserver registered to android.provider.Settings.System that should observe changes of any audio

  • 0

I have a ContentObserver registered to android.provider.Settings.System that should observe changes of any audio volume. It is notified as expected when clicking the hardware volume buttons but is not notified when I change the audio volume via AudioManager.setStreamVolume or AudioManager.adjustStreamVolume.

Here’s how my ContentObserver looks like:

// this is a Service
this.getApplicationContext().getContentResolver().registerContentObserver(
  android.provider.Settings.System.CONTENT_URI, 
  true, new ContentObserver(new Handler()) {
    public void onChange(boolean selfChange) {
      Log.d("ContentObserver", "got notified");
    }
});

And here my call to AudioManager.adjustStreamVolume:

// this.context is the activities context
this.context.getSystemService(Context.AUDIO_SERVICE).adjustStreamVolume(
  AudioManager.STREAM_RING, AudioManager.ADJUST_LOWER,
  AudioManager.FLAG_SHOW_UI);

I have read this and that post and the AudioManager and Settings.System documentation and can not find a reason why the Observer is notified when changing the volume with the volume buttons but not when changing it with the AudioManager.

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:07:30+00:00Added an answer on May 29, 2026 at 11:07 am

    The AudioManager does broadcast an intent

    android.media.VOLUME_CHANGED_ACTION`

    But this is not part of the official documentation. So this might change in future releases. But you could use this atleast for gingerbread devices.

    you can find more about the extras in the intent from here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a content observer that should be notified when one of the contacts
I have a content observer that polls content://sms/ in android 1.5 so that I
Is it possible to observe the date (e.g. like a ContentObserver) so that every
For some reason my android ContentObserver is being registered multiple times. The ContentObserver is
I have a Cursor 'c' that generates a ListView. The Content Provider ensures that
Have a query that should hopefully be nice and simple to answer. I have
Have done quite a bit of searching for a guide (of any substance) for
I'm currently working on an Android application. I wish to have a GridView on
Have a bunch of WCF REST services hosted on Azure that access a SQL
I have a service running that contains an SQLite DB and a Content Observer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.