Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks in V2 embedding in background service #251

Closed
1 of 2 tasks
ened opened this issue Apr 1, 2020 · 3 comments
Closed
1 of 2 tasks

Breaks in V2 embedding in background service #251

ened opened this issue Apr 1, 2020 · 3 comments

Comments

@ened
Copy link
Contributor

ened commented Apr 1, 2020

馃敊 Regression

The plugin currently calls the startListening like so:

    @Override
    public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
        if(flutterPluginBinding == null) {
            return;
        }

        startListening(
                flutterPluginBinding.getApplicationContext(),
                binding.getActivity(),
                flutterPluginBinding.getBinaryMessenger(),
                binding::addActivityResultListener,
                binding::addRequestPermissionsResultListener);
    }

However, in a background service, with V2 embedding, this won't ever be called, thus rendering the plugin dysfunctional.

Old (and correct) behavior

V1 embedding is not affected.

Reproduction steps

Build a background service, request permission status.

Configuration

Version: 4.4.0.hotfix.2

Platform:

  • 馃摫 iOS
  • 馃 Android

This should be fixed in both a 4.4.0.hotfix.3 version and 5.0.0.hotfix.2

I will prepare a PR as it's urgently needed (against the 4.4.0.hotfix.2 tag).

@mvanbeusekom perhaps you could create a 4.4.0.hotfix.2 branch so two releases can be pushed to pub (should be possible, no?).

@mvanbeusekom
Copy link
Member

@ened I have pushed a branch called hotfix/4.4.0 based on the tag 4.4.0+hotfix.2 (I was unable to push a branch called 4.4.0+hotfix.2).

@ened ened mentioned this issue Apr 1, 2020
4 tasks
@ened
Copy link
Contributor Author

ened commented Apr 1, 2020

@mvanbeusekom opened the PR. There are still issues to be solved in a future version:

  • activity&permission result listeners are added but not removed
  • no v1 testing activity in the example
  • no e2e testing
  • should have deeper NPE checks for activity, activityRegistry and permissionRegistry, but not without tests

@mvanbeusekom
Copy link
Member

@ened new versions have been released:

  • 4.4.0+hotfix.4
  • 5.0.0+hotfix.3

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

No branches or pull requests

2 participants