My app freezes after I activate the background job and try to reopen
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- android, ios, javascript, react-native
- Ambito
- mobile
Direzione di ricerca
Start by reproducing the freeze with the React Native AppState and BackgroundJob lifecycle shown in the issue, then inspect the library’s platform-specific background service entry points. The report does not identify a failing platform, reproduction project, or expected fix, so first establish whether the service remains active after returning to the app and compare behavior on Android and iOS.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hey people,
I have an app that triggers a background job immediately when my app state turns to 'background' using the AppState method from react native and stopping this background job once my AppState returns 'active'. The background job I'm activating has a function inside that listens sounds and then activates itself when receives an specific word, when I am activating my app after recognizes the sound and i try to re enter to the app, the app freezes and doesn't load my resources, so the only way to restart the app is uninstalling it because the background job is still running, how can I solve this issue? there is a better way I can use the dependency?
async componentDidMount() {
this.props.isBackground.current = false;
BackgroundJob.stop();
this._stopProcessing()
}
async componentDidUpdate() {
if (AppState.currentState === 'background' && !this.props.isBackground.current) {
this.props.isBackground.current = true;
await BackgroundJob.start(this.backgroundListening, options);
} else if (AppState.currentState === 'active' && this.props.isBackground.current) {
this.props.isBackground.current = false;
BackgroundJob.stop();
this._stopProcessing()
}
}
- Lingua principale
- Java
- Stelle
- 941
- Fork
- 145
- Merge medio
- 1g 23h
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Rapsssito/react-native-background-actions
-
iOS CocoaPods build fails: Package.swift included in sources causes No such module 'PackageDescription'Forse già presa @dattm97 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
I’m facing a problem on iOSAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
Rapsssito/react-native-background-actions#255 · 4 commenti ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Rapsssito/react-native-background-actions#249 · 16 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Rapsssito/react-native-background-actions#246 · 5 commenti · 2 reazioni ·
Tutte le issue di Rapsssito/react-native-background-actions
Issue simili
-
bug verbose GC
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
IBM/javacore-analyser#677 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
liberation-data/fornax4j#302 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
grimmory-tools/grimmory#3297 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
SmartPack/PackageManager#186 ·
-
Area: Java feature request needs triage OS: Windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
actions/runner-images#15457 ·
I maintainer di solito rispondono entro 3 giorni