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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:48:35+00:00 2026-06-03T11:48:35+00:00

The program functions like this: the user has a list of phone numbers, for

  • 0

The program functions like this: the user has a list of phone numbers, for which the cellphone could vibrate upon an incoming call only when no other system-wide application would provide vibration (such as in mute mode). I know that this is somehow against the rules, for that an application should respect the users’ settings, but the application is limited to some certain users with this need. I have tried two ways but neither of them are satisfying:

  1. Listen to the telephony state and directly trigger the vibration service with my own pattern (with Vibrator.vibrate()). This method is effective with no incoming calls yet randomly effective when the phone is in CALL_STATE_RINGING state and I guess it’s because of the conflict with the system-wide application that actually handles the vibration upon incoming call.

  2. Judge whether the cellphone is vibrating upon an incoming call (with AudioManager.shouldVibrate()), and decide whether to change the vibrate settings (with AudioManager.setRingerMode() and AudioManager.setVibrateSetting()). If the vibrate settings are changed by my application, they are to be restored once the cellphone is back to CALL_STATE_IDLE state. This method, however, is still not functioning sometimes, without any sign of the reason.

I hope that someone could give some advice on this issue. Comments on these two ways or other suggest are welcome.

  • 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-03T11:48:37+00:00Added an answer on June 3, 2026 at 11:48 am

    You need to play with two settings in order for your phone to vibrate. The first one is the sound mode which needs to be set by using AufioManager:

    AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
    audioManager.setRingerMode(targetSoundMode);
    

    The second part is not properly documented and I believe this is the missing part of your code:

    String VIBRATE_IN_SILENT_SETTING_NAME = "vibrate_in_silent";
    Settings.System.putInt(getContentResolver(), VIBRATE_IN_SILENT_SETTING_NAME, 1);
    

    use 1 to turn vibrate on and 0 to turn vibrate off.

    to fully understand how you should work with vibrate settings and mode take a look at the following link:
    http://hi-android.info/src/com/android/settings/SoundSettings.java.html

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

Sidebar

Related Questions

This program has the user input name / age pairs and then outputs them,
I have a program which reads an XML file using the DOM functions: $doc
This is the example code, I'm using these functions for a program, but scanf
I have a C program which has a function call that is defined in
Below program contains two show() functions in parent and child classes, but first show()
I have a C program with a couple of static functions that are not
I need to write custom ord and chr functions. I'm writing a little program
I have this function: Program A public ICollection<ReportLocationInfo> GetAllReportsInstalled() { return _Reports; } I
I'm having trouble developing a standard for returning data from user functions passed and
I am working on a program in Ruby with Watir that has a series

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.