The listener works fine only on the first install #79
-
When I install my app for the first time the listener works perfectly When I close the app from recent apps and open it again it is no longer fetching the notification and only works when I uninstall and again re install the app index.js import { AppRegistry } from 'react-native'; // Headless Task to listen for notifications
} AppRegistry.registerHeadlessTask( AppRegistry.registerComponent(appName, () => App); App.tsx import React, { useState, useEffect } from 'react'; let interval: any = null; interface INotificationProps { const Notification: React.FC = ({
}; function App() {
} export default App; Kindly check this code and help me with my app |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Fixed this by disabling battery optimisation to the app |
Beta Was this translation helpful? Give feedback.
Fixed this by disabling battery optimisation to the app