Skip to content

Commit

Permalink
removed v1 Android embedding references (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikuB authored Apr 29, 2023
1 parent 90b4750 commit 43a905d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
3 changes: 2 additions & 1 deletion flutter_appauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
## 5.0.0

* **Breaking change** Bumped minimum Flutter SDK version to 3.0.0 and Dart SDK version to 2.17
* [Android] removed references to v1 embedding
* [Android] updated `compileSdkVersion` to 31 (Android 12)
* [Android] bumped AGP (Android Gradle plugin) to 7.4.2
* [Android] conditionally adds a namespace for compatibility with AGP 8.0
* Note: it's quite likely that the AppAuth Android SDK itself requires this change going forward but this change will ensure that the `flutter_appauth` plugin has done this change ahead of time
* Applied following updates to the example app on the Android side
* Bumped AGP to 7.4.2 and Gradle 7.5
* Used namespace instead of package identifier since the latter has been deprecated (reference: https://developer.android.com/build/releases/past-releases/agp-7-3-0-release-notes#package-deprecated). Note that this result in an error that says "package identifier or launch activity not found" when running the example app via the `flutter run` command on Flutter versions lower than 3.7 due to gap/issue in the tooling and will still allow APKs or app bundles to be built
* Used namespace instead of package identifier since the latter has been deprecated (reference: https://developer.android.com/build/releases/past-releases/agp-7-3-0-release-notes#package-deprecated). Note that as of this writing, using the `flutter run` command on the stable channel (i.e. Flutter version 3.7.1) to debug/run the app will in an error that says "package identifier or launch activity not found". However, an APK or app bundle can still be built and will run on a device. The Flutter team have already addressed this issue on the master channel that is currently on version 3.10.0-17.0.pre.21 so would expect the next stable release to contain the fix. Alternatively developers can manually restore the package identifier though this change was done to avoid issues from happening in the future

## 4.2.1+1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry;
import android.text.TextUtils;

/**
* FlutterAppauthPlugin
Expand Down Expand Up @@ -76,24 +75,7 @@ public class FlutterAppauthPlugin implements FlutterPlugin, MethodCallHandler, P
private boolean allowInsecureConnections;
private AuthorizationService defaultAuthorizationService;
private AuthorizationService insecureAuthorizationService;

@SuppressWarnings("deprecation")
public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
final FlutterAppauthPlugin plugin = new FlutterAppauthPlugin();
plugin.setActivity(registrar.activity());
plugin.onAttachedToEngine(registrar.context(), registrar.messenger());
registrar.addActivityResultListener(plugin);
registrar.addViewDestroyListener(
new PluginRegistry.ViewDestroyListener() {
@Override
public boolean onViewDestroy(io.flutter.view.FlutterNativeView view) {
plugin.disposeAuthorizationServices();
return false;
}
});
}



private void setActivity(Activity flutterActivity) {
this.mainActivity = flutterActivity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
-->
<uses-permission android:name="android.permission.INTERNET"/>

<!-- 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:label="flutter_appauth_example"
android:icon="@mipmap/ic_launcher">
Expand All @@ -39,7 +34,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
Expand Down

0 comments on commit 43a905d

Please sign in to comment.