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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:03:40+00:00 2026-06-05T07:03:40+00:00

I am writing an application that relies on the Android device (for my current

  • 0

I am writing an application that relies on the Android device (for my current testing purposes an HTC Evo 4G and several original Motorola Droids) being discoverable via bluetooth for 300 seconds.

I am targeting Android version 2.0.1, so according to the API I should be able to prompt the user to enable discoverability for a maximum of 300 seconds. On both my Droids and my Evo the prompt window has 300 seconds listed, but they both end after 120 seconds.

The code I used to prompt the user is here:

private void makeDiscoverable() {
    Intent discoverableIntent = new Intent(
            BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
    discoverableIntent.putExtra(
            BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);
    startActivity(discoverableIntent);
}

I am certain that this code runs. However, I later have a handler for when my discoverability status changes (in this case ends, I assume) that reads like this:

if (isDiscoverableChange(action)) {
            int discoverState = intent.getIntExtra(
                    BluetoothAdapter.EXTRA_SCAN_MODE, Short.MIN_VALUE);
            if (isDiscoverableState(discoverState)) {
                setItOrder();
                setUpScanAndDisplay();
            } else {
                discoverScheduler.cancel();
                itScheduler.cancel();
            }
        }

private boolean isDiscoverableChange(String action) {
    return BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(action);
}

private boolean isDiscoverableState(int state) {
    return state == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE;
}

I tried commenting out the portion that runs when discoverability mode ends, just in case it was cancelling everything prematurely, but discoverability really does end after 120 seconds.

Is this a hardware issue, or am I doing something wrong here?

  • 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-05T07:03:43+00:00Added an answer on June 5, 2026 at 7:03 am

    It appears to be a bug:

    Issue 15486: Bluetooth Adapter.EXTRA DISCOVERABLE not obeyed
    http://code.google.com/p/android/issues/detail?id=15486

    Issue 13361: BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION intent Extra does not extend 120 sec discovery interval
    http://code.google.com/p/android/issues/detail?id=13361

    First reported Dec 22, 2010, still listed as ‘new’ status, so I wouldn’t expect this to be fixed.

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

Sidebar

Related Questions

I am writing an application that responds to keyboard actions. To automate testing, I
We are writing an ExtJS application that relies in large measure on trapping a
I am writing an application in Pylons that relies on the output of some
I am writing a Ruby on Rails(3) application that relies on an xml feed
I writing an application that draws in openGL es 1.0 in the Android NDK
I am writing an application in XNA that relies on render targets that are
Im writing an application that supposed to send coordinates in an SMS, but I've
I'm writing an application that needs to perform some tasks only if there is
I'm writing an application that will have an option to run on Windows Startup.
I'm writing an application that uses the phone's camera to take a picture, and

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.