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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:43:31+00:00 2026-06-08T21:43:31+00:00

I am checking whether Bluetooth is on or not using the following method; while

  • 0

I am checking whether Bluetooth is on or not using the following method;

while (!isOn) {
    isOn = LocalDevice.isPowerOn();

    if (isOn) {
        startProcess();
        break;
    }

    try {
        Thread.sleep(10000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

But, I think this will eat the phone resources.
I am looking for some listener kind of thing (like BroadcastReceivers in Android) which will notify me when the user turns on the Bluetooth. I’ve already googled it and also searched the BlackBerry Community Forum, but didn’t find any solution. It will be great if anybody of you guides me in the right direction.

My development environment;

  • BlackBerry JDE Eclipse Plugin 1.5.0
  • Targeting BlackBerry JRE 5.0
  • 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-08T21:43:34+00:00Added an answer on June 8, 2026 at 9:43 pm

    I tried to build a Bluetooth app for OS 5.0 a couple years ago, that needed this, and I never found it available in the APIs (so I didn’t build the app at all).

    The way you have your sample code, though, doesn’t look terribly wasteful. A check every 10 seconds isn’t a lot. The OS performs lots of other checks at a faster rate than that. The only issue I could see is if RIM implemented that one call (isPowerOn()) in some really inefficient way.

    But, really, your program is so short that I think the best thing to do is build it, let it run on your phone while you go to sleep, and then compare battery level to the next night, when you don’t run the app. A good experiment is far more useful than I am 🙂

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

Sidebar

Related Questions

Is there a definitive JavaScript method for checking whether or not a web page
Hey; I'm currently using the following way of checking whether an image exists on
While checking whether an object is nil, someone use 1: if (object == nil)
I am running the following query and checking whether it returns any results and
I have this code for checking whether the Date is OK or not, but
When installing rJava using the install.packages(rJava) command I get the following error: checking Java
I'm checking whether a file has been modified or not in order to refresh
Again I have problem with checking whether DataReader object has data or not? Dim
What's the simplest way of programatically checking whether or not a particular Windows machine
I am having trouble checking whether there is a radio selection is not made

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.