Bluetooth button integration
Hi
here is an idea for integration of a Bluetooth button into locus!
So far I used locus with 100% display brightness of my smartphone, but this costs a lot of battery power!
But to switch to 100 % brightness is only necessary if you look at the locus map for navigation.
So I linked my smartphone to a 5 button Bluetooth device, which can toggle the display brightness between e.g. 10 to 100 % via a small tasker program.
I attached the button close to my handlebar, so I can handle the button just with my thumb.
The center button toggles the brightness. The buttons above and below the center button can be used for zooming in and out. The remaining two buttons could be programed for some other tasks.
Even with the additional Bluetooth connection is the energy consumption of the battery by far reduced.
So if you could integrate a waterproof Bluetooth button (may be you can sell it!) into your software would help a lot!
Thanks for considering my I idea.
Best regards,
Claus
P.S.: I attached a jpg, which shows my handlebar bag together and the GPS-shell from Ortlieb together with my Samsung smartphone. Next to the right bar you can see the round (1 inch diameter) Bluetooth button from Satechi (Media button).
I have so much other tasks to do and I have to deal here with custom mapping for BT keyboard, damn :).
Oki, so in next version will be new setup in config.cfg
Values are "keyCodes", usually defined here ( 'KEYCODE_x' values ), or I'm sure there will be application that display pressed keyCode value. In case you needs to use "shift", it is possible to prefix "s70" like for zoom-in action. Enjoy it.
I have so much other tasks to do and I have to deal here with custom mapping for BT keyboard, damn :).
Oki, so in next version will be new setup in config.cfg
Values are "keyCodes", usually defined here ( 'KEYCODE_x' values ), or I'm sure there will be application that display pressed keyCode value. In case you needs to use "shift", it is possible to prefix "s70" like for zoom-in action. Enjoy it.
Good day Claus,
nice tools on your handlebar.
Locus already support control over hardware buttons. You have to enable it in settings : http://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_settings:screen ( Use hardware buttons ).
Thank if you are able to program buttons on your BT device to certain keys, like +/- for zoom, it should already work.
Good day Claus,
nice tools on your handlebar.
Locus already support control over hardware buttons. You have to enable it in settings : http://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_settings:screen ( Use hardware buttons ).
Thank if you are able to program buttons on your BT device to certain keys, like +/- for zoom, it should already work.
What about hardware key to add new point?
What about hardware key to add new point?
Menion you are right, HW buttons already work with Locus. I purchased a cheap mini BT gamepad recently and tested it for use as a "remote" for Locus. After remapping the Keys with "External Keyboard Helper Pro" app, I was able to enable/disable the display, center on gps position and pan and zoom the map.
Although this is working fine, it has the disadvantage that I have to use "External keyboard Helper Pro" app to remap the keys of the remote. This app works as a virtual keyboard, which means the "normal" virtual keyboard is not easily available any more, when text input is required (for example in Address Search or Quck POIs).
So maybe you could think about making the keycodes freely configurable through an (advanced) settings screen or maybe config.cfg? This would make the additional remapping step through the virtual keyboard unnecessary on an unrooted device.
Also, would it be possible to add "Toggle Screen Rotation" to the HW key bindings?
Menion you are right, HW buttons already work with Locus. I purchased a cheap mini BT gamepad recently and tested it for use as a "remote" for Locus. After remapping the Keys with "External Keyboard Helper Pro" app, I was able to enable/disable the display, center on gps position and pan and zoom the map.
Although this is working fine, it has the disadvantage that I have to use "External keyboard Helper Pro" app to remap the keys of the remote. This app works as a virtual keyboard, which means the "normal" virtual keyboard is not easily available any more, when text input is required (for example in Address Search or Quck POIs).
So maybe you could think about making the keycodes freely configurable through an (advanced) settings screen or maybe config.cfg? This would make the additional remapping step through the virtual keyboard unnecessary on an unrooted device.
Also, would it be possible to add "Toggle Screen Rotation" to the HW key bindings?
Locus Map supports several "Android intents" which allows an external app (like Tasker) to control Locus. The available intents are described here:
http://docs.locusmap.eu/doku.php?id=manual:advanced:locus_api:public_intents
Currently, there are four Locus intents:
Perhaps the most flexible solution is to have more Locus intents, such as intents for zooming in and out (and other functions). This solution doesn't operate through the keyboard so you don't need "External Keyboard Helper Pro" and the virtual keyboard would not be affected.
You could use Tasker to make the Bluetooth buttons zoom the map using the new Locus intents. If you added the AutoVoice app, you could probably use voice commands to control Locus via intents.
Locus Map supports several "Android intents" which allows an external app (like Tasker) to control Locus. The available intents are described here:
http://docs.locusmap.eu/doku.php?id=manual:advanced:locus_api:public_intents
Currently, there are four Locus intents:
Perhaps the most flexible solution is to have more Locus intents, such as intents for zooming in and out (and other functions). This solution doesn't operate through the keyboard so you don't need "External Keyboard Helper Pro" and the virtual keyboard would not be affected.
You could use Tasker to make the Bluetooth buttons zoom the map using the new Locus intents. If you added the AutoVoice app, you could probably use voice commands to control Locus via intents.
Ok, this could also work, but I don't know if intents are meant to be used for purposes like zoom/pan in an appliction (which might not even be in the foreground at the time the intent is initiated).
Menion, what's your opinion on this?
Ok, this could also work, but I don't know if intents are meant to be used for purposes like zoom/pan in an appliction (which might not even be in the foreground at the time the intent is initiated).
Menion, what's your opinion on this?
Intents can provide whatever functionality the app developer chooses to expose. If an app is not in the foreground, or if the app is not in the correct "operating mode", the developer ensures the requested action fails gracefully.
For example, I tested the existing Waypoint intent. It only works if you are in track-recording mode. If you are not recording a track, the Waypoint intent fails and a message appears in Locus Map (indicating it is not in track-recording mode).
Intents can provide whatever functionality the app developer chooses to expose. If an app is not in the foreground, or if the app is not in the correct "operating mode", the developer ensures the requested action fails gracefully.
For example, I tested the existing Waypoint intent. It only works if you are in track-recording mode. If you are not recording a track, the Waypoint intent fails and a message appears in Locus Map (indicating it is not in track-recording mode).
Well idea with "intents" is really interesting and I think it should work. Not too complicated for me to create, but it sounds for me really complicated to setup on side of user/device. At least I personally was so confused from "tasker" application, that I've rather un-install it :).
For me, main though against some deeper support of bluetooth hardware buttons is "where the hell should I purchase some usable bluetooth buttons that I may attach to bike/motorcycle"? I remember I search for some last summer and after few hours I really gave up this ...
So for me biggest negative on this is problem with obtain some usable hardware keys ... any tips?
Well idea with "intents" is really interesting and I think it should work. Not too complicated for me to create, but it sounds for me really complicated to setup on side of user/device. At least I personally was so confused from "tasker" application, that I've rather un-install it :).
For me, main though against some deeper support of bluetooth hardware buttons is "where the hell should I purchase some usable bluetooth buttons that I may attach to bike/motorcycle"? I remember I search for some last summer and after few hours I really gave up this ...
So for me biggest negative on this is problem with obtain some usable hardware keys ... any tips?
I have so much other tasks to do and I have to deal here with custom mapping for BT keyboard, damn :).
Oki, so in next version will be new setup in config.cfg
Values are "keyCodes", usually defined here ( 'KEYCODE_x' values ), or I'm sure there will be application that display pressed keyCode value. In case you needs to use "shift", it is possible to prefix "s70" like for zoom-in action. Enjoy it.
I have so much other tasks to do and I have to deal here with custom mapping for BT keyboard, damn :).
Oki, so in next version will be new setup in config.cfg
Values are "keyCodes", usually defined here ( 'KEYCODE_x' values ), or I'm sure there will be application that display pressed keyCode value. In case you needs to use "shift", it is possible to prefix "s70" like for zoom-in action. Enjoy it.
Search device with bracket. Zossebart had problems with this. https://www.amazon.de/Musik-Fernbedienung-Kamera-Ausl%C3%B6ser-Selbstausl%C3%B6ser-Windows-iPhone-Smartphone/dp/B013BJCMSO
Problem: http://help.locusmap.eu/topic/bluettoth-button-integration#comment-37965
This works but without holder: https://www.amazon.de/gp/product/B01CWMT7BQ/
Has anyone experience with other devices that work?
this? https://www.amazon.de/FAVOLCANO-Bluetooth-Button-Smausng-Smartphones/dp/B01CHKR0E4/ref=pd_cp_107_2?_encoding=UTF8&psc=1&refRID=8FA0C99EDEG36XXZ6WMK
Or does this have the same problem as described above?
Search device with bracket. Zossebart had problems with this. https://www.amazon.de/Musik-Fernbedienung-Kamera-Ausl%C3%B6ser-Selbstausl%C3%B6ser-Windows-iPhone-Smartphone/dp/B013BJCMSO
Problem: http://help.locusmap.eu/topic/bluettoth-button-integration#comment-37965
This works but without holder: https://www.amazon.de/gp/product/B01CWMT7BQ/
Has anyone experience with other devices that work?
this? https://www.amazon.de/FAVOLCANO-Bluetooth-Button-Smausng-Smartphones/dp/B01CHKR0E4/ref=pd_cp_107_2?_encoding=UTF8&psc=1&refRID=8FA0C99EDEG36XXZ6WMK
Or does this have the same problem as described above?
Look for my solution: http://help.locusmap.eu/topic/external-bluetooth-controller-more-commands
It works without any problem.
Look for my solution: http://help.locusmap.eu/topic/external-bluetooth-controller-more-commands
It works without any problem.
Rather expensive but FWIW http://www.bikermart.co.uk/proddetail.asp?prod=87552
Rather expensive but FWIW http://www.bikermart.co.uk/proddetail.asp?prod=87552
Nice!
Together with a lap function (open feature wish) when recording tracks, a simple BT button could do the trick of marking a lap while running!
Nice!
Together with a lap function (open feature wish) when recording tracks, a simple BT button could do the trick of marking a lap while running!
I just tried this out, in principle all fine, but I can't get "Display On" to work. No matter what button of my remote (it's one of those round ones with Vol+/-, Skip </> and Play/Pause) I use: Turning display off works, but when the display is off and I press the button, my music player is started in the background.
I did set hardware_buttons_enabled_during_screen_lock=1 - is there anything else, perhaps within the Android system, I have to do?
I just tried this out, in principle all fine, but I can't get "Display On" to work. No matter what button of my remote (it's one of those round ones with Vol+/-, Skip </> and Play/Pause) I use: Turning display off works, but when the display is off and I press the button, my music player is started in the background.
I did set hardware_buttons_enabled_during_screen_lock=1 - is there anything else, perhaps within the Android system, I have to do?
Replies have been locked on this page!