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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:30:54+00:00 2026-05-20T03:30:54+00:00

developing for Android phone(ver 1.5) I would like to know if there is an

  • 0

developing for Android phone(ver 1.5)
I would like to know if there is an option to add listener when long-press Send button occurs. and also the same question about voulme-mute action ?

thanks,
ray.

  • 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-20T03:30:55+00:00Added an answer on May 20, 2026 at 3:30 am

    Since you’re using a pretty early version of the API, there is one method which could be sueful for you, KeyEvent.getDownTime().

    public boolean onKey(View v, int keyCode, KeyEvent event) {
      if (keyCode == KeyEvent.KEYCODE_CALL && event.getDownTime() > 1000){
        // Long call key event
      }else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
        AudioManager m = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE); // changing 'this' for your context instance
        int vol = m.getStreamVolume(AudioManager.STREAM_SYSTEM); // using your desired stream type
        if (vol == 0){
          // Is the volume switched off?
        }
    }
    

    Of course you have to set to your view the OnKeyListener by the setOnKeyListener method:

    myView.setOnKeyListener(this);
    

    and implement the OnKeyListener interface in the class you like.

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

Sidebar

Related Questions

I would like to display Arabic text in my Android application. I am developing
I am developing a solution for transfering data from android phone to the server
I am interested in developing an app for my HTC Magic (Android) phone. Using
I'm currently developing an application to manage my pictures on an Android phone. I
I'm looking to get a device (phone, tablet, etc.) for developing Android applications. I
Has anybody had any success with developing for Android platform using Netbeans (5.5+ )
Developing websites are time-consuming. To improve productivity, I would code a prototype to show
I started developing android applications. And am testing with the android emulator. Do I
I am currently developing an application that receives GPS data gathered using and android
I would like to learn mobile development for fun and as well to enrich

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.