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 8991235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:40:50+00:00 2026-06-15T22:40:50+00:00

My goal is to support a functionality that mute phone (possibly with vibrations enabled/disabled),

  • 0

My goal is to support a functionality that mute phone (possibly with vibrations enabled/disabled), so when a call or sms is received it won’t make noise

unmute phone but prompt for “password for unmute”.

And this remains valid for any other application, that it ask for password entry before unmute…

How can I do this? What permissions are required in AndroidManifest?

  • 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-06-15T22:40:51+00:00Added an answer on June 15, 2026 at 10:40 pm

    Previously on Stackoverflow, Android mute/unmute phone.

    Those answers discuss both permissions and the coding. Also, tasker can handle everything you’re looking to do.

    And here’s a link to a tutorial.

    The code below runs fine in the emulator. When you run it, you can see the mute goes on in the notification area. In addition to the code, I had to add the (uses) permission for android.permission.MODIFY_AUDIO_SETTINGS.

    public class MainActivity extends Activity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        AudioManager audio = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
    
        audio.setRingerMode(AudioManager.RINGER_MODE_SILENT);
    
        return true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to support 2 operations: mute phone (possibly with vibrations enabled/disabled), so
Goal is to make a dialog that appears on menu_key pressed, but it keeps
Goal: Produce an Excel document with information from 3 associated models that is similar
I'm looking for profilers that support per request profiling statistics, ideally along the programs
I'm trying to implement a HashMap-based tree that'd support O(1) subtree lookup for a
I want to make an html5-based webpage for mobile devices that shows a map
I have created an Html 5 page that provides important server-side functionality. Unfortunately, it
The ultimate goal is to specify contracts for a class that resides in an
My original goal here was a modal dialog, but you know, Android didn't support
Goal: Website1 sends Website2 user data through http requests. Problem: Website2 is ensured that

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.