×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    7

    Question detecting if bluetooth is enabled (Series 40)

    Hello,

    as I am currently developing a J2ME midlet using bluetooth running on Series 40 platform cell phones like the Nokia 6600 fold, I'd like to know how to detect if bluetooth is active/enabled.

    Or is it even possible to enable and disable bluetooth from inside a J2ME midlet?

    I want my midlet to only use bluetooth if it was enabled before and to remind the user to switch off bluetooth afterwards to save energy.

    Currently, if bluetooth isn't enabled, any bluetooth action leads to a user dialog asking the user if he/she wants to enable bluetooth. I'd like to know before that dialog, if bluetooth is enabled and I'd like to know afterwards to be able to remind the user to switch it off again.

    Thanks in advance,
    Dirk Spöri

  2. #2
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    106

    Re: detecting if bluetooth is enabled (Series 40)

    No, you can't switch on/off bluetooth using your J2ME midlet.
    If you want to check if it is enabled just initialize your bluetooth connection, if bluetooth exception is thrown, then bluetooth on your phone is probably disabled.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Code:
    boolean on = javax.bluetooth.LocalDevice.isPowerOn(); // since JSR-82 version 1.1

Similar Threads

  1. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  2. Replies: 0
    Last Post: 2005-01-07, 14:52
  3. bluetooth enabling is not possible on the Emulator Series 60
    By vigneshp in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2004-04-01, 05:39
  4. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  5. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×