Closed Mikeruss closed 2 years ago
pls try the new version
Ok, now tracking works well, but the phone does not lock keypad and the screen is always on. As a result, the phone heating and discharging, buttons can be pressed incidentally. Consider to make your own procedure to turn off the screen and to lock the keypad. I guess you can leave only “enter” active to unblock the keyboard and turn on the screen.
1) during tracking_interval
execution, store points of tracking into temp array
2) on visibilitychange
=== hidden
, lock cpu
& gps
3) on visibilitychange
=== visible
, unlock cpu
& gps
then redraw points of tracking in temp array
on map
@arma7x i think window.navigator.requestWakeLock ("gps"); enough to draw the path even when the screen is off.
https://medium.com/dev-channel/experimenting-with-the-wake-lock-api-b6f42e0a089f
but I also save the path in localstorage in case the app crashes or the user accidentally stops tracking, so the next time the tracking is started he can continue where he left off (in case he is not too far away from the last point)
@Mikeruss i will place a checkbox in the settings with which you can control the behavior when starting the tracking: screen wake on / off
@strukturart Ok, I guess this will be fine
@Mikeruss checkout the new version
@strukturart I've make a short test, it looks like it works well, great work! I’ve experienced a couple of troubles while saving track, but some additional assessment is required in this direction. I'm going to make a deeper test in a forest together with garmin device. I'll give you a little report after a few weeks.
I suspect a KaiOs phone cannot replace a Garmin device for tracking because the battery power is too weak and the system has problems with apps running in the background. i use the app on bike tours to orientate myself, but i track it with a garmin watch. but who knows what improvements kaiOs 3.0 will bring. I also fixed a bug to label markers with a tooltip and save them with it.
Ok, that’s done. I used the Nokia tooth 800 and o.map in short forest trips several km long from the camp (hiking, mushroom collection). App works well. In flight mode and active GPS the one charge is enough for 3-4 days. And one always has ability to make a call in emergency situation. I guess this protected phone able to replace garmin in short trips or support it in professional tracking. This is very useful tool – many people, who aren’t professional tourists and have no good GPS lost in such short trips. I experienced only a few troubles. 1. Ones App refused to turn off the screen and discharged the battery fast. This problem disappeared after the phone restart. I guess this was some system bag. 2. The other thing – the indication of GPS activity is highly appreciated. For example, red/green circle in top left conner and error message when you starting to share waypoint or start tracking before there is no actual GPS position. Because when tracking is started before satellites are acquired, it is not work at all, I’ve lost several tracks this way. Sharing position in this case results in zeros in longitude and latitude. You also can use this indication to delay the start of tracking until the required number of satellites are acquired. 3. Messages in the top (“last known position” etc.) disappearing very fast, I’ve unable to read them in most of cases. Maybe drop them by “enter” button and/or after longer interval (~5-10 sec). Doing so, it could be good to add two check boxes in the menu: “Autostart tracking” and “autoupdate the position” at app start. It also could be handy to slightly change the arrow buttons operation: turn “Center the position” (4) always on, but when you push arrow buttons, it turning Off, and you can observe the map. Then, after pressing “Backspace”, “Center the position” (4) turning On again. This is the same scheme as garmin use. This way you can use hotkey 4 for some other option.
Thank you @Mikeruss for testing the app. Please install the latest version of the app, I have made some improvements.
Points in track are missed when phone is locked. It draws straight line between points where the phone was locked and unlocked. (Nokia tough 800)