react-native-maps icon indicating copy to clipboard operation
react-native-maps copied to clipboard

App crashes when it is in background for more than 10 minutes

Open AyushiPalm opened this issue 2 years ago • 7 comments

Summary

I have created a new react native application with importing map view only, When I go in the background and come after 10 minutes it is restarting the application.

Also it is happening for first time only.

There are no background applications running.

RAM usage when application is in the background is 300-400 MB.

Without the mapview it is running perfectly fine.

Reproducible sample code

import { StyleSheet, Text, View } from 'react-native';
import React from 'react';
import MapView, { Marker, PROVIDER_GOOGLE } from 'react-native-maps';

const App = () => {
  return (
    <MapView
      scrollEnabled={false}
      zoomEnabled={true}
      provider={PROVIDER_GOOGLE} // remove if not using Google Maps
      style={{ height: 400, width: '100%', marginTop: 20 }}
      region={{
        latitude: 21.170240,
        longitude: 72.831062,
        latitudeDelta: 0.015,
        longitudeDelta: 0.0121,
      }}>
      <Marker
        coordinate={{
          latitude: 21.170240,
          longitude: 72.831062,

        }}
        pinColor={'red'} // any color
      />
    </MapView>
  );
};

export default App;

const styles = StyleSheet.create({});

Steps to reproduce

Run above code and go in the background in android for 10 minutes

Expected result

Should display mapview

Actual result

Restart the application

React Native Maps Version

1.18.0

What platforms are you seeing the problem on?

Android

React Native Version

0.72.5

What version of Expo are you using?

Not using Expo

Device(s)

Pixel 6a

Additional information

No response

AyushiPalm avatar Oct 18 '23 11:10 AyushiPalm

A few questions to help narrow things down. What do you mean by Also it is happening for first time only. Do you just minimize the app and leave the phone for 10 min or do you go do something else on the phone? How exactly are you measuring the RAM usage? What Android version is running on your Pixel 6a?

matale avatar Nov 04 '23 03:11 matale

A few questions to help narrow things down. What do you mean by Also it is happening for first time only. Do you just minimize the app and leave the phone for 10 min or do you go do something else on the phone? How exactly are you measuring the RAM usage? What Android version is running on your Pixel 6a?

  1. Yes we are not using any other application in background
  2. We are checking RAM usage from android studio profiler
  3. Android 13

AyushiPalm avatar Nov 06 '23 13:11 AyushiPalm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

github-actions[bot] avatar Feb 05 '24 01:02 github-actions[bot]

Still relevent

andalib-oper avatar Feb 14 '24 15:02 andalib-oper

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

github-actions[bot] avatar May 15 '24 01:05 github-actions[bot]

Still relevant

Jolteon18 avatar May 21 '24 21:05 Jolteon18

same issue

BerreYesilyurt avatar Jul 11 '24 07:07 BerreYesilyurt