Start it correctly
startForeground() has a clock on it
WalkTrackingService extends Service (not ViewModel β a Service is its own Android component, alongside Activity). Its onStartCommand() is called once the service is started, and from there you have only a few seconds to call startForeground(id, notification) β miss that window and the system ANRs (kills the app for being unresponsive) or kills the service outright. The rule of thumb: call it first, before anything else in onStartCommand().
Since Android 8 (API 26), every notification needs a NotificationChannel β a category the user can individually mute or configure in system settings β created once before it's ever used. The notification itself is what makes the foreground service visible: "PawWalk is tracking a walk", with no way for the user to swipe it away while the service runs. That persistent, undismissable notification is the user's signal that GPS is active β not a courtesy, the whole point of the mechanism.