Skip to content

Commit

Permalink
Merge pull request #16 from jonasbark/master
Browse files Browse the repository at this point in the history
use standard Activity as calling class to support FlutterFragmentActivity
  • Loading branch information
lejard-h committed Nov 6, 2017
2 parents c873ece + d9c3c47 commit b3fe32b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.0.9

- Android: remove the need to use FlutterActivity as base activity

# 0.0.5

- fix "onDestroy" event for iOS [#4](https://github.com/dart-flitter/flutter_webview_plugin/issues/4)
Expand All @@ -14,4 +18,4 @@

# 0.0.2

- Initial version for Android
- Initial version for Android
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
* FlutterWebviewPlugin
*/
public class FlutterWebviewPlugin implements MethodCallHandler {
private FlutterActivity activity;
private Activity activity;
public static MethodChannel channel;
private final int WEBVIEW_ACTIVITY_CODE = 1;
private static final String CHANNEL_NAME = "flutter_webview_plugin";

public static void registerWith(PluginRegistry.Registrar registrar) {
channel = new MethodChannel(registrar.messenger(), CHANNEL_NAME);
FlutterWebviewPlugin instance = new FlutterWebviewPlugin((FlutterActivity) registrar.activity());
FlutterWebviewPlugin instance = new FlutterWebviewPlugin((Activity) registrar.activity());
channel.setMethodCallHandler(instance);
}

private FlutterWebviewPlugin(FlutterActivity activity) {
private FlutterWebviewPlugin(Activity activity) {
this.activity = activity;
}

Expand Down Expand Up @@ -62,4 +62,3 @@ private void close(MethodCall call, MethodChannel.Result result) {
result.success(null);
}
}

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors:
- Hadrien Lejard <hadrien.lejard@gmail.com>
- Toufik Zitouni <toufiksapps@gmail.com>
homepage: https://github.com/dart-flitter/flutter_webview_plugin
version: 0.0.8
version: 0.0.9

flutter:
plugin:
Expand Down

0 comments on commit b3fe32b

Please sign in to comment.