1. Download our Official Android App: Forums for Android!

Generating alert on bluetooth

Discussion in 'Android Apps & Games' started by umairthegame, Aug 5, 2011.

  1. umairthegame

    umairthegame Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Aug 5, 2011

    Aug 5, 2011
    4
    0
    5
    Hi,
    I want to know that is there any way i can generate alert on the event that my bluetooth device is discovered!
    For example, i turn my device's bluetooth on, an alert should be generated if my device is discovered by another bluetooth device, only discovered and not connected!...is it even possible?
    OS is android of course!
    Waiting for reply

    Regards,
    Umair.
     

    Advertisement

  2. pool_shark

    pool_shark Android Expert
    Rank:
     #74
    Points:
    343
    Posts:
    2,519
    Joined:
    Aug 21, 2010

    Aug 21, 2010
    2,519
    578
    343
    Male
    Infrastructure Engineer
    Ohio
    I'm not sure if tasker could do that for you or not, but if you have your device set to not be discovered, no problem.
     
  3. umairthegame

    umairthegame Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Aug 5, 2011

    Aug 5, 2011
    4
    0
    5
    Actually i am android developer (noob one..LOL)...yes device is set to be discovered...only problem is just creating alert IF MY DEVICE IS DISCOVERED! thatz it..so that i can use that alert into my android app
     
  4. pool_shark

    pool_shark Android Expert
    Rank:
     #74
    Points:
    343
    Posts:
    2,519
    Joined:
    Aug 21, 2010

    Aug 21, 2010
    2,519
    578
    343
    Male
    Infrastructure Engineer
    Ohio
    I understand what you're asking, I'm just saying if you set your device not to be discovered, it won't be an issue.

    Is there a reason you want it to be discoverable?
     
  5. umairthegame

    umairthegame Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Aug 5, 2011

    Aug 5, 2011
    4
    0
    5
    Thanx for your reply. Yes actually the reason for doing so is that i want to detect nearby objects using my android phone. Now to do that, if i use bluetooth on my mobile phone, its battery will drain very quickly(means if i search for nearby bluetooth devices periodically via my mobile phone, my phone can't even last for an hour...i think). SO i thought of doing that task the other way,

    1) Turn on my bluetooth on my device and make it discoverable.
    2) Nearby Object(lets say a computer) which i want to detect will have a bluetooth device aswell, and it will scan for bluetooth devices periodically. If my device is detected by that bluetooth node, i should get an alert on my app. I don't want to pair these two devices because i want the object(computer) to handle multiple devices at a time. So paring makes no sense. So in this scenario, i can't even use RFID because most android devices don't have RFID receiver!
     
  6. pool_shark

    pool_shark Android Expert
    Rank:
     #74
    Points:
    343
    Posts:
    2,519
    Joined:
    Aug 21, 2010

    Aug 21, 2010
    2,519
    578
    343
    Male
    Infrastructure Engineer
    Ohio
    But making your device discoverable and scanning for devices are two different settings.
    You can do one without the other.
     
  7. umairthegame

    umairthegame Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Aug 5, 2011

    Aug 5, 2011
    4
    0
    5
    yeah i know, but is it possible to generate such kind of alert on mobile phone.

    you get an alert when you are requested to receive a file or pair another device with yours.
    But i want to generate alert even when my device is discovered by other bluetooth device? if yes then how :thinking:
     
  8. pool_shark

    pool_shark Android Expert
    Rank:
     #74
    Points:
    343
    Posts:
    2,519
    Joined:
    Aug 21, 2010

    Aug 21, 2010
    2,519
    578
    343
    Male
    Infrastructure Engineer
    Ohio
    The only way I know of would be to use tasker and that's if it has that particular capability.
     

Share This Page

Loading...