Skip to content

Commit

Permalink
migrate to flutter embedding 2
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Wei committed Sep 27, 2020
1 parent 26a37bc commit 1e9c170
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
16 changes: 3 additions & 13 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Flutter Catalog"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true">
Expand All @@ -25,13 +19,6 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -40,5 +27,8 @@
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="ocr,label,barcode,face" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.fluttercatalog;

import android.os.Bundle;
import io.flutter.app.FlutterFragmentActivity;
import io.flutter.embedding.android.FlutterFragmentActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterFragmentActivity {
Expand All @@ -12,9 +12,4 @@ protected void attachBaseContext(android.content.Context base) {
super.attachBaseContext(base);
androidx.multidex.MultiDex.install(this);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}

0 comments on commit 1e9c170

Please sign in to comment.