Commit 63f77cf1 authored by Lorenzo Pichilli's avatar Lorenzo Pichilli

Updated for Flutter 1.12 new Java Embedding API (Android), updated DropDown Workaround

parent c05e0e39
package com.pichillilorenzo.flutter_inappwebview;
public class Shared {
}
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"connectivity","dependencies":[]},{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inappwebview","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"permission_handler","dependencies":[]}]}
\ No newline at end of file
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".EmbedderV1Activity"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/InAppWebViewTheme" android:theme="@style/InAppWebViewTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
...@@ -50,6 +51,23 @@ ...@@ -50,6 +51,23 @@
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/InAppWebViewTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!--<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>-->
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<!--<meta-data
android:name="flutterEmbedding"
android:value="2" />-->
</activity>
<provider <provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider" android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
......
package com.pichillilorenzo.flutterwebviewexample;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class EmbedderV1Activity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
\ No newline at end of file
package com.pichillilorenzo.flutterwebviewexample; package com.pichillilorenzo.flutterwebviewexample;
import android.os.Bundle; import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
public class MainActivity extends FlutterActivity { public class MainActivity extends FlutterActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public void configureFlutterEngine(FlutterEngine flutterEngine) {
super.onCreate(savedInstanceState); flutterEngine.getPlugins().add(new InAppWebViewFlutterPlugin());
GeneratedPluginRegistrant.registerWith(this);
} }
} }
\ No newline at end of file
...@@ -11,6 +11,7 @@ version: 1.0.0+1 ...@@ -11,6 +11,7 @@ version: 1.0.0+1
environment: environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0" sdk: ">=2.0.0-dev.68.0 <3.0.0"
flutter: ">=1.10.0 <2.0.0"
dependencies: dependencies:
flutter: flutter:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment