App crashes when it is in background for more than 10 minutes
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
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?
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?
- Yes we are not using any other application in background
- We are checking RAM usage from android studio profiler
- Android 13
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.
Still relevent
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.
Still relevant
same issue