Page MenuHomeGitPull.it

Show GTFS realtime positions of buses in the map
ClosedPublic

Authored by fabio.mazza on Jun 4 2023, 12:36.
Referenced Files
Unknown Object (File)
Mon, Jul 15, 21:05
Unknown Object (File)
Mon, Jul 15, 21:03
Unknown Object (File)
Mon, Jul 15, 17:55
Unknown Object (File)
Mon, Jul 15, 00:36
Unknown Object (File)
Sun, Jul 14, 23:50
Unknown Object (File)
Sun, Jul 14, 23:49
Unknown Object (File)
Sun, Jul 14, 23:44
Unknown Object (File)
Sun, Jul 14, 23:43

Details

Summary

Upgrade DB and write first version of querying the database

Download missing trips information from Mato and insert in DB

Put together stuff and cleanup

Clean up dependencies

Add new icon for bus stop

Show bus positions in map and update them

Animate position change of the buses in the map

Add custom info window for buses

Fix crashes, run on lower API device

Avoid asking permission in Android >=11

Color touches, avoid clicking the stuff under the info window

BeforeAfter
LibreBusTO map before T699.png (1×591 px, 1 MB)
LibreBusTO map after T699.png (1×591 px, 1 MB)

Closes T699

Test Plan

Build, check the app is running smooth

Diff Detail

Repository
R4 Libre BusTO
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

fabio.mazza created this revision.
Restricted Application added 1 blocking reviewer(s): valerio.bozzolan. · View Herald TranscriptJun 4 2023, 12:49

Add comments and disable osmbonuspack

Uhm

06-04 15:39:15.130 19346 19346 I BusTO-MapViewModel: positionsLiveData changed

06-04 15:39:15.380 19346 19426 E AndroidRuntime: FATAL EXCEPTION: arch_disk_io_0
06-04 15:39:15.380 19346 19426 E AndroidRuntime: Process: it.reyboz.bustorino.debug, PID: 19346
06-04 15:39:15.380 19346 19426 E AndroidRuntime: java.lang.RuntimeException: Exception while computing database live data.
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at androidx.room.RoomTrackingLiveData$1.run(RoomTrackingLiveData.java:92)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at androidx.room.TransactionExecutor$1.run(TransactionExecutor.java:47)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:923)
06-04 15:39:15.380 19346 19426 E AndroidRuntime: Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter pattern
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at it.reyboz.bustorino.data.gtfs.TripAndPatternWithStops.<init>(Unknown Source:7)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at it.reyboz.bustorino.data.gtfs.GtfsDBDao_Impl$27.call(GtfsDBDao_Impl.java:1870)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at it.reyboz.bustorino.data.gtfs.GtfsDBDao_Impl$27.call(GtfsDBDao_Impl.java:1763)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        at androidx.room.RoomTrackingLiveData$1.run(RoomTrackingLiveData.java:90)
06-04 15:39:15.380 19346 19426 E AndroidRuntime:        ... 4 more
06-04 15:39:15.385  1550 19430 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
06-04 15:39:15.386  1550  3081 W ActivityTaskManager:   Force finishing activity it.reyboz.bustorino.debug/it.reyboz.bustorino.ActivityPrincipal

06-04 15:39:15.414 19346 19426 I Process : Sending signal. PID: 19346 SIG: 9
  • Change gradle wrapper version

Be bop be bop. I'm a bot. Builded:

D116-libre-busto-unsigned.apk

sha256 3b7467a4d848004c254a93d673a87fac70f5acb35c094a922406a06998063360  ./app/build/outputs/apk/debug/app-debug.apk

Tested locally, no nuclear implosions

Since we are programmers and not designers it's ugly as shit, but I totally do not care since I PRETTY DAMN LIKE this version

The bearing indication is just lovely, for example

sgtm

This revision is now accepted and ready to land.Jun 4 2023, 18:52