Skip to content

Fix crash when calling FlutterPlugin.[initialize, hasPermissions] for the first time#12

Merged
JulianAssmann merged 1 commit into
masterfrom
bugfix/first_initialize
Jan 2, 2021
Merged

Fix crash when calling FlutterPlugin.[initialize, hasPermissions] for the first time#12
JulianAssmann merged 1 commit into
masterfrom
bugfix/first_initialize

Conversation

@JulianAssmann

Copy link
Copy Markdown
Owner
  • Fix bug where calling FlutterBackground.initialize() for the first time crashes the app
  • Fix bug where calling FlutterBackground.hasPermissions for the first time crashes the app
  • Fix some typos
  • Address notification icon in the documentation
  • Enhance error handling in example app

The bug was due to a call to result.success() when calling FlutterBackground.initialize() even if the app was still waiting for the user to ignore battery optimizations, allowing for subsequent calls to FlutterBackground.enableBackgroundExecution(), that failed because the battery optimizations were not granted at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant