This object is in archive! 

Possible to use hardware button on locked screen?

Uwe Borkenau shared this question 7 years ago
Answered

I use Locus Pro on a Samsung Galaxy S5 Active. İ use it also for hiking and bicycling at rainy weather. Than I have to use the function "locked screen", because it isn't possible to use the touchscreen at rainy weather. Unfortunately it isn't possible to use the hardware buttons for the zoom when the screen is locked. But this would be a great future at rainy weather. Is there any possibility in the settings to change it?

or @Menion: Is there any possibility to implement it at Locus?

Replies (8)

photo
1

Good day Uwe,

are we here talking about "lock screen" made by device itself or really a "lock screen" function available on Locus Map main map screen in bottom right corner?

If we talk about lock screen made by Locus Map, then using hardware buttons here is disabled from security reasons. Anyway it is possible to enable this option as well, thanks to config.cfg file and parameter called hardware_buttons_enabled_during_screen_lock . So set this parameter to value "true" ( or "1" ) and it should work as you need.

photo
1

Hello Menion and thanks for the fast answer.

Yes, we are talking about lock screen made by locus map with the bottom in the right corner.

And I have find the file and have changed the setting to "1" but it doesn't function.

Than I have restart my device and have seen that the setting has changed automatically back to "0".


For testing I have changed the setting:

map_hold_center_method_timeout=15

and after a restart of my device it function perfectly.


So...I think that I have understand your explanation but the setting doesn't function.


Do you have an idea why?

photo
1

Hmm it looks like Locus incorrectly recognized changes in file and overwrite this parameter with default value.

May you try, in list of applications in your device, completely terminate Locus by "FORCE STOP" button? Then edit the file and then open Locus Map? Thanks

photo
1

Hello Menion. Unfortunately it is not possible to terminate Locus by using the "FORCE STOP" Button at my device.

Do you have any other idea or can it be a bug that you can fix with a new update?

photo
1

Good day Uwe,

hmm interesting. I'm sure, config file works correctly ( mainly because it is quite old system that should be really tested ). It looks like on your device, it makes a problem to change values, do not know why.

Maybe you should try for example edit config.cfg file in device and then restart a device.

photo
1

Hi Menion. I tried a few things. Also your tip with the "Force stop" button. But it's always the same. It makes no difference, if the setting for hardware_buttons_enabled_during_screen_lock=0 or 1. I can not use the volume buttons to zoom when "lock screen" is enabled. Other functions I can change in the config.cfg file. A friend with another device has exactly the same problem. Maybe you find a solution. I have no idea anymore.

But thanks for the great app. If you find any solution for my problem your app would be absolutely perfect. :-)

photo
1

Good day,

I was so sure that this feature should work, that I did not even tested it. Well, it does not work to me as well.


Sorry for a longer discussion, issue on my side. It will be fixed in next version, so please try to change this parameter once more, after new version will be published and let me know if there still be any problem. Thanks

photo
1

Thanks for the update. Now it's function. You are great. :-)

photo
1

Hello Menion,

thanks for your respond. I will wait for the next update and try it than again.

photo
1

Hi Menion,

I have an issue closely related to this one so I though i'd post it here instead of creating a new entry. Please tell me if i should open a new one.

So I have the same use case as Uwe (using hardware buttons on bike, and locus screenlock if it is raining), and with the "hardware_buttons_enabled_during_screen_lock" option enabled from the expert menu, hardware buttons work for zoom in and zoom out. It doesn't work with option disabled, which makes perfect sense.BUT I also like to use other functions through hardware buttons: screen on/off toggle, and centering map. Those don't work when locus own screenlock is enabled.

To give more details I'm using a bluetooth remote as hardware buttons, but I guess this has to be unrelated to the issue.

Thanks

Vincent

photo
1

Hello Vincent,

this is really interesting. I'm checking the app source code and "centering" function should work under same conditions as zoom-in and zoom-out (condition is visible map screen). The screen on/off then should work always in case, Locus Map is running.

Please double check your settings for these two functions. Centering is by default mapped to key "C", display toggle then to key "D".

photo
1

Hi Menion,

I checked settings, as I had to try a bit to make my bluetooth remote work in the first place (without lockscreen), as it has limited buttons key_code.

I had to initially assign the KEYCODE_BACK (4) to display toggle and KEYCODE_DPAD_CENTER (23) to centering, because these were the ideally placed buttons on my remote.Again, this works without screenlock so I assume i got the settings right, but i can somehow see that "special keys" may cause problems with screenlock.

Then i saw that my remote can send the KEYCODE_SPACE (62), so i tried that. Again, works for display toggle without screenlock, doesn't work with it.

But maybe space key is something a bit special too, so...

Then I just installed a keyboard layout customization app, so that my remote can now send KEYCODE_C and KEYCODE_D (31 and 32). I also changed the config.cfg so that display toggle and centering use these codes again.After a bit of fiddling... this works!

For my own use, this is ok as it is. Not ideal to use one more app (have to be sure the right custom keyboard layout is active, has to disable it if i want to type something with the on-screen keyboard etc) but still doable.. and i plan to build my own remote soon (where i get to choose the key codes sent).

Thanks !


edit: note that using the centering button with display off turns the display on but does not center screen (regardless of screen lock status). Total non issue i guess but i just found out while working on that.

photo
1

Good day Vincent,

thanks for the precise testing. I'm rather checking app source code the second time, but still does not see any reason why this should not work.

If you want to dig into this problem, I may only create special version that will print or display pressed key event to see what really happens in application.

Replies have been locked on this page!