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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use standard Activity as calling class to support FlutterFragmentActivity #16

Merged
merged 1 commit into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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