views:

109

answers:

2

I have written a small app that puts my bluetooth in discoverable mode for a long time (G1 - API 1.6). I use that along with small program on windows to lock/unlock the computer if the phone is close by. Recently i try to port this app to my nexus one but it seems like i have to pop up the message every 300s to enable device to go to discoverable mode. does anyone know how i can suppress that?

I'm ok with saying ok for the first time but not every 300s :)

A: 

I was wondering if you could possibly just listen for ACTION_SCAN_MODE_CHANGED for a change in the scan mode and then reset it if needed.

If that isn't what you are looking for, maybe there is some way to manipulate the bluetooth stack directly, however I am not too sure about that to tell you the truth. The first option above should do the trick (almost) seamlessly.

dasginganinja
I have tried that already. It does not work :(
Ralphz
Did you end up figuring out your fix? I'm sure you can do it by manipulating the bluetooth stack.
dasginganinja
I have not found a way to make it permanently discoverable on Android 2.x :(
Ralphz
+1  A: 

Instead of discovering the phone, wouldn't it be more secure to pair the phone and the computer which would then let you search for it without the phone even being discoverable?

Steve Prior
This is probably the only way to do that on android 2.x. There is no way to make a phone permanently discoverable on 2.x unlike 1.x.
Ralphz