Locus Map - forum

Support => Troubles & Questions => Topic started by: pmoravec on July 06, 2011, 18:03:45

Title: Change Bluetooth GPS device/zmena BT GPS?
Post by: pmoravec on July 06, 2011, 18:03:45
Hi,
I have clicked on a wrong Bluetooth device and now I can't find a way to change it - connection always fails, but the device selection popup does not appear anymore. How do I change it without resorting to resetting the settings/hacking the sqlite database?

Zdravim,
tuknul jsem pri vyberu Bluetooth GPS na spatne zarizeni a ted nemuzu vybrat spravnou BT GPS v Locusu. Je nejaka moznost (mimo resetu nastaveni/hackovani sqlite databaze), jak zmenit zarizeni, ke kteremu se to pripojuje? Popup se seznamem zarizeni uz se znovu nezobrazuje a spojeni samozrejme vzdycky selze.
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: berkley on July 06, 2011, 19:50:24
Hi,

I am not sure, but you could try the following:
- go to Android bluetooth settings
- delete the bluetooth connection which is connected with Locus
- go to Locus and start bluetooth GPS service

Of course, you can add the "wrong" bluetooth device again to your Android device after the steps above worked.

Cheers, berkley
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: pmoravec on July 06, 2011, 21:56:05
Quote from: "berkley"Hi,

I am not sure, but you could try the following:
- go to Android bluetooth settings
- delete the bluetooth connection which is connected with Locus
- go to Locus and start bluetooth GPS service

Of course, you can add the "wrong" bluetooth device again to your Android device after the steps above worked.

Cheers, berkley

Hi,
thanks, but no luck here. You can drop the Bluetooth pairing in 2.2 this way, but the device stays in the list and Locus is still trying to connect to it (although it will not be offered in the popup anymore, see bellow).

Anyway after looking for the fix, the dirty solution for geeks with the root shell & 'vi' is simple:
we have to drop the key (line)
<string name="KEY_S_GPS_BLUETOOTH_DEVICE_ID">XX:XX:XX:XX:XX:XX</string>  

in
/data/data/menion.android.locus.pro/shared_prefs/menion.android.locus.pro_preferences.xml
or
/data/data/menion.android.locus/shared_prefs/menion.android.locus_preferences.xml

This resets the configuration & it is possible to choose again. I was originally wondering if it is possible to erase the device from settings menu and I somehow missed it. It seems that this is not the case, maybe it could be added to settings menu in one of the later versions?
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: berkley on July 07, 2011, 00:40:39
Ok, now this gets interesting...

I've got 2 bluetooth devices. And I am able to switch between both, depending on which is available at the moment via bluetooth without editing some xml files in Locus directory.
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: Menion on July 07, 2011, 05:38:07
hey, exact keys are visible in this file?? Interesting :) ... yes this is solution ... I'll add another solution into next version. When you disable Bluetooth GPS in settings, I'll also clear this settings, so next time you enable it, you'll have to choose BT GPS device again. Is this solution OK?
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: pmoravec on July 07, 2011, 17:28:07
Quote from: "menion"hey, exact keys are visible in this file?? Interesting :) ... yes this is solution ... I'll add another solution into next version. When you disable Bluetooth GPS in settings, I'll also clear this settings, so next time you enable it, you'll have to choose BT GPS device again. Is this solution OK?

Thanks, this solution should work well.

Yes, shared prefs are saved this way ;). In fact, there is additional file in Pro version (but luckilly with obsfucated prefs), three guesses what...
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: berkley on July 07, 2011, 18:44:19
Hmm, why don't you make a little sub-menu in gps settings?
There could be a list of all connected bluetooth devices and you can choose the one you like to be connected.
Understand?
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: Menion on July 07, 2011, 18:54:03
understand, but this is not needed. I added new settings into GPS settings screen that reset active connection. Works fine and doesn't confuse users by some more button on gps screen. This useful only rarely ...
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: shuyinxiao on July 14, 2011, 03:30:32
understand, thanks,
Your article is quite uplifting
Title: Re: Change Bluetooth GPS device/zmena BT GPS?
Post by: pmoravec on July 18, 2011, 13:32:26
Quote from: "menion"understand, but this is not needed. I added new settings into GPS settings screen that reset active connection. Works fine and doesn't confuse users by some more button on gps screen. This useful only rarely ...

Thanks I see it included in current version, I will test it in future if necessary.