Skip to content

Conversation

@xster
Copy link
Member

@xster xster commented Dec 11, 2019

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Dec 11, 2019
deprecated, but we encourage you to migrate to the new APIs.
Over time, plugins using the old APIs might produce strange
behaviors when embedding Flutter into an Android app.
The new APIs has the advantage of providing a cleaner set of accessors for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The new API has the..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Over time, plugins using the old APIs might produce strange
behaviors when embedding Flutter into an Android app.
The new APIs has the advantage of providing a cleaner set of accessors for
lifecycle dependent components compared to the old APIs. For instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/APIs/API

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

6. Create an `EmbeddingV1Activity.java` file that uses the v1
embedding in the same folder as `MainActivity`. For example:
1. (Optional) Create an `EmbeddingV1Activity.java` file that uses the v1
embedding in the same folder as `MainActivity` in the example project to keep
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awkward. "Create an EmbeddingV1Activity.java file that uses the v1 embedding for the example project in the same folder as MainActivity to keep..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

```

7. Add the `EmbeddingV1Activity` to the
7. (Optional) Add the `EmbeddingV1Activity` to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these optional steps should we mention when they would want to be done?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few more words

@sfshaza2
Copy link
Contributor

@xster, it looks like you forked this when the build was broken. Would you mind grabbing the latest, merging, and submitting again? The build is fixed now. Thz

@xster
Copy link
Member Author

xster commented Dec 14, 2019

CI passes now

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for me

@sfshaza2
Copy link
Contributor

Waiting for @mklim, @gaaclarke, and/or @matthew-carroll to review.

@xster xster merged commit 1bef6dc into flutter:master Dec 16, 2019
@xster xster deleted the plugin-migration branch December 16, 2019 20:22
Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow review pass, I saw a couple things here that I think we may want to update again.

```yaml
environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.9.1+hotfix.4 <2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be the new stable now, 1.12. 1.9 is missing some fixes that will matter in a few edge cases so I think it's better to just recommend stable here.

```

4. Manually register the E2E plugin in `MainActivity.java`
1. Manually register the E2E plugin in `MainActivity.java`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed in v1.12?

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

Labels

cla: yes Contributor has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guide for migrating v1 Android plugins to v2 APIs

5 participants