This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[battery] Support the v2 Android embedder #2152
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
10cc6a1
migrate the example app to AndroidX
amirh 0e5d91e
[battery] Support the v2 Android embedder.
amirh f593806
Bump the minor version instead of patch version
amirh ed9195c
review fixes
amirh 6a5ea5d
add e2e tests, update flutter constraints in pubspec
amirh 541b33b
Merge branch 'master' into battery_embedder_v2
amirh 09b940f
fix analyzer warnings
amirh 682687f
add TODO to remove gradle hack
amirh b90f434
move the e2e test out of the example app folder and make it test some…
amirh 5b898e6
add missing license header
amirh 58d7721
remove driver boilerplate, change TODO to my name, better name for th…
amirh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[battery] Support the v2 Android embedder.
- Loading branch information
commit 0e5d91e462dcb3e78e93766fea722e7c1e555199
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ## 0.3.0+6 | ||
|
|
||
| * Support the v2 Android embedder. | ||
|
|
||
| ## 0.3.0+5 | ||
|
|
||
| * Fix Gradle version. | ||
|
|
||
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
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
12 changes: 12 additions & 0 deletions
12
...ample/android/app/src/main/java/io/flutter/plugins/batteryexample/EmbedderV2Activity.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package io.flutter.plugins.batteryexample; | ||
collinjackson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| import io.flutter.embedding.android.FlutterActivity; | ||
| import io.flutter.embedding.engine.FlutterEngine; | ||
| import io.flutter.plugins.battery.BatteryPlugin; | ||
|
|
||
| public class EmbedderV2Activity extends FlutterActivity { | ||
| @Override | ||
| public void configureFlutterEngine(FlutterEngine flutterEngine) { | ||
| flutterEngine.getPlugins().add(new BatteryPlugin()); | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| org.gradle.jvmargs=-Xmx1536M | ||
| android.enableR8=true | ||
| android.useAndroidX=true | ||
collinjackson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| android.enableJetifier=true | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state | |
| (full, charging, discharging) on Android and iOS. | ||
| author: Flutter Team <[email protected]> | ||
| homepage: https://github.com/flutter/plugins/tree/master/packages/battery | ||
| version: 0.3.0+5 | ||
| version: 0.3.0+6 | ||
|
|
||
| flutter: | ||
| plugin: | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is redundant with
this.applicationContext = applicationContext;in the otheronAttachedToEngine