Skip to content

Commit

Permalink
Replace deprecated getFlutterEngine calls on Android (firebase#2050)
Browse files Browse the repository at this point in the history
* Resolve firebase#2049
  • Loading branch information
creativecreatorormaybenot authored Mar 2, 2020
1 parent cb37d77 commit ac5ddec
Show file tree
Hide file tree
Showing 27 changed files with 55 additions and 21 deletions.
4 changes: 4 additions & 0 deletions packages/firebase_admob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.1+3

* Replace deprecated `getFlutterEngine` call on Android.

## 0.9.1+2

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public void onAttachedToActivity(ActivityPluginBinding binding) {
initializePlugin(
pluginBinding.getApplicationContext(),
binding.getActivity(),
pluginBinding.getFlutterEngine().getDartExecutor());
pluginBinding.getBinaryMessenger());
}

@Override
Expand All @@ -271,7 +271,7 @@ public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding
initializePlugin(
pluginBinding.getApplicationContext(),
binding.getActivity(),
pluginBinding.getFlutterEngine().getDartExecutor());
pluginBinding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_admob/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_admob
description: Flutter plugin for Firebase AdMob, supporting
banner, interstitial (full-screen), and rewarded video ads
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_admob
version: 0.9.1+2
version: 0.9.1+3

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_database/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.3

* Replace deprecated `getFlutterEngine` call on Android.

## 3.1.2

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void setupMethodChannel(BinaryMessenger messenger) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
setupMethodChannel(binding.getFlutterEngine().getDartExecutor());
setupMethodChannel(binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_database/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_database
description: Flutter plugin for Firebase Database, a cloud-hosted NoSQL database
with realtime data syncing across Android and iOS clients, and offline access.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_database
version: 3.1.2
version: 3.1.3

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_dynamic_links/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.0+11

* Replace deprecated `getFlutterEngine` call on Android.

## 0.5.0+10

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void onFailure(Exception e) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
channel = createChannel(binding.getFlutterEngine().getDartExecutor());
channel = createChannel(binding.getBinaryMessenger());
channel.setMethodCallHandler(this);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_dynamic_links/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: firebase_dynamic_links
description: Flutter plugin for Google Dynamic Links for Firebase, an app solution for creating
and handling links across multiple platforms.
version: 0.5.0+10
version: 0.5.0+11
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links

dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_in_app_messaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.1+3

* Replace deprecated `getFlutterEngine` call on Android.

## 0.1.1+2

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public FirebaseInAppMessagingPlugin() {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
BinaryMessenger binaryMessenger = binding.getFlutterEngine().getDartExecutor();
BinaryMessenger binaryMessenger = binding.getBinaryMessenger();
channel = setup(binaryMessenger);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_in_app_messaging/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firebase_in_app_messaging
description: Flutter plugin for Firebase In-App Messaging.
version: 0.1.1+2
version: 0.1.1+3
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_in_app_messaging

environment:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_messaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.0.12

* Replace deprecated `getFlutterEngine` call on Android.

## 6.0.11

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ private void setActivity(Activity flutterActivity) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_messaging/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_messaging
description: Flutter plugin for Firebase Cloud Messaging, a cross-platform
messaging solution that lets you reliably deliver messages on Android and iOS.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging
version: 6.0.11
version: 6.0.12

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_ml_vision/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.3+8

* Replace deprecated `getFlutterEngine` call on Android.

## 0.9.3+7

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
channel = new MethodChannel(binding.getFlutterEngine().getDartExecutor(), CHANNEL_NAME);
channel = new MethodChannel(binding.getBinaryMessenger(), CHANNEL_NAME);
channel.setMethodCallHandler(new FirebaseMlVisionHandler(binding.getApplicationContext()));
}

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_ml_vision/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: firebase_ml_vision
description: Flutter plugin for Firebase machine learning vision services.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_ml_vision
version: 0.9.3+7
version: 0.9.3+8

dependencies:
flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_performance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.1+7

* Replace deprecated `getFlutterEngine` call on Android.

## 0.3.1+6

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
channel = new MethodChannel(binding.getFlutterEngine().getDartExecutor(), CHANNEL_NAME);
channel = new MethodChannel(binding.getBinaryMessenger(), CHANNEL_NAME);
channel.setMethodCallHandler(this);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_performance/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Performance Monitoring for Firebase, an a
measurement solution that monitors traces and HTTP/S network requests on Android and
iOS.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_performance
version: 0.3.1+6
version: 0.3.1+7

dependencies:
flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_remote_config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0+3

* Replace deprecated `getFlutterEngine` call on Android.

## 0.3.0+2

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
setupChannel(binding.getBinaryMessenger(), binding.getApplicationContext());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_remote_config/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_remote_config
description: Flutter plugin for Firebase Remote Config. Update your application look and feel and behaviour without
re-releasing.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_remote_config
version: 0.3.0+2
version: 0.3.0+3

dependencies:
flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.3

* Replace deprecated `getFlutterEngine` call on Android.

## 3.1.2

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ private void onAttachedToEngine(Context applicationContext, BinaryMessenger bina

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_storage/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_storage
description: Flutter plugin for Firebase Cloud Storage, a powerful, simple, and
cost-effective object storage service for Android and iOS.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_storage
version: 3.1.2
version: 3.1.3

flutter:
plugin:
Expand Down

0 comments on commit ac5ddec

Please sign in to comment.