[Android] Stop rogue service restarts#714
Merged
Guichaguri merged 1 commit intodoublesymmetry:devfrom Sep 1, 2019
Merged
Conversation
…itself when there is no React context yet. That caused crash with "Module AppRegistry is not a registered callable module (calling startHeadlessTask)" error
benjipott
pushed a commit
to benjipott/react-native-track-player
that referenced
this pull request
Dec 3, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714) Make music service not sticky so that android won't start service by itself when there is no React context yet.
Daimyo7
pushed a commit
to Daimyo7/react-native-track-player
that referenced
this pull request
Dec 27, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714) Make music service not sticky so that android won't start service by itself when there is no React context yet.
Daimyo7
pushed a commit
to Daimyo7/react-native-track-player
that referenced
this pull request
Dec 27, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714) Make music service not sticky so that android won't start service by itself when there is no React context yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes "Module AppRegistry is not a registered callable module (calling startHeadlessTask)" crash I've been seeing in reports for a long time.
START_STICKYcaused cases when service is started by android automatically (it was possible to reproduce it on some devices by restarting an app multiple times, while other devices never did it, so it was not easy to catch), when there is no react context yet, no MusicModule initialized, etc - and when our code tries to register playback service, app crashes with that error.