mapbox / mapbox/mapbox-navigation-android

Voice instructions not working on low memory condition

Open
#2,255 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

archived
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Android API: 16+
Mapbox Navigation SDK version: 0.43.0

It can be related to this issue

Steps to trigger behavior

When you lock the screen or press the home button to put the navigation into the background, It can be killed by Android in low memory condition (or any other conditions that cause navigation activity to get destroyed).

The problem is that users can't get any voice instruction while their phone is locked.

Expected behavior

Voice instruction must be working on low memory condition, like Waze.

Actual behavior

On low memory condition:

  1. Android kills the navigation Activity
  2. stopNavigation will be called so it unbinds the NavigationService
  3. There is no foreground service to deliver voice instructions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing stopNavigation in libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/MapboxNavigation.java and how it unbinds NavigationService when the Activity is destroyed. Reproduce the background or low-memory scenario, then verify that voice instructions continue after the navigation Activity is killed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.