rnmapbox / rnmapbox/maps

[Bug]: Android bug homescreen transparency when goBack

Open
#3,723 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🪲 Needs: Author Feedback
Dominant language
Kotlin
Stars
2.9k
Forks
947
Avg merge
6d 37m
Merged PRs (30d)
1

Description

Mapbox Implementation

Mapbox

Mapbox Version

10.1.31

React Native Version

0.74.3

Platform

Android

@rnmapbox/maps version

10.1.31

Standalone component to reproduce
import React, { useRef } from 'react';
import Mapbox from '@rnmapbox/maps';
import {View} from "react-native";

Mapbox.setAccessToken('YOUR_MAPBOX_ACCESS_TOKEN');

const Map = () => {
  const camera = useRef<Mapbox.Camera>(null);
  const map = useRef<Mapbox.MapView>(null);

  const zoomLevel = 10;

  return (
    <View>
        <Mapbox.MapView
          ref={map}
          styleURL="mapbox://styles/mapbox/light-v11"
          projection={'globe'}
          logoEnabled={false}
          attributionEnabled={false}
          scaleBarEnabled={false}>
          <Mapbox.Camera ref={camera} zoomLevel={zoomLevel} animationMode={'flyTo'} animationDuration={2000} />
        </Mapbox.MapView>
    </View>
  );
};
Observed behavior and steps to reproduce

https://github.com/user-attachments/assets/51f632d0-d039-4291-a32d-34b052db5828

Expected behavior

Video ^^^

Notes / preliminary analysis

I tried:

  • change backgroundColor
  • change and put navigation.navigate('Home') instead of goBack
  • change header transparency and put it with a color

IMPORTANT: the bug is only with the android build, in debug mode it works good (ONLY WITH SOME ANDROID, NOT ALL)

Additional links and references

Video ^^^

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 with the standalone React Native Map component using Mapbox.MapView and Camera, then reproduce the reported behavior on Android release builds while navigating back. Done means the homescreen no longer becomes transparent on affected Android devices; compare against debug behavior and the attached video.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.