Skip to content

Commit a08796a

Browse files
authored
[flutter_appauth] add info for apps targeting Android 11 or newer (MaikuB#144)
* add info for app targeting Android 11 or newer * add info on bumping SDK versions to changelog
1 parent 4977dfc commit a08796a

File tree

6 files changed

+41
-4
lines changed

6 files changed

+41
-4
lines changed

flutter_appauth/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.9.2+5
2+
3+
* Updated the Android setup section in the readme to include information for apps targeting Android 11 (API 30) or newer
4+
* [Android] bumped compile SDK version for the plugin to 30
5+
* Updated example app to use compile and target SDK version 30
6+
17
## 0.9.2+4
28

39
* [Android] fix issue [131](https://github.com/MaikuB/flutter_appauth/issues/131) where setting the `allowInsecureConnections` flag to true whilst doing an authorisation or token request didn't behave as expected. Thanks to the PR from [Hongxu Xu](https://github.com/xuhongxu96)

flutter_appauth/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,24 @@ android {
106106

107107
Please ensure that value of `<your_custom_scheme>` is all in lowercase as there've been reports from the community who had issues with redirects if there were any capital letters.
108108

109+
If your app is target API 30 or above (i.e. Android 11 or newer), make sure to add the following to your `AndroidManifest.xml` file a level underneath the `<manifest>` element
110+
111+
112+
```xml
113+
<queries>
114+
<intent>
115+
<action android:name="android.intent.action.VIEW" />
116+
<category android:name="android.intent.category.BROWSABLE" />
117+
<data android:scheme="https" />
118+
</intent>
119+
<intent>
120+
<action android:name="android.intent.action.VIEW" />
121+
<category android:name="android.intent.category.APP_BROWSER" />
122+
<data android:scheme="https" />
123+
</intent>
124+
</queries>
125+
```
126+
109127
## iOS setup
110128

111129
Go to the `Info.plist` for your iOS app to specify the custom scheme so that there should be a section in it that look similar to the following but replace `<your_custom_scheme>` with the desired value

flutter_appauth/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 29
25+
compileSdkVersion 30
2626

2727
defaultConfig {
2828
minSdkVersion 16

flutter_appauth/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727

2828
android {
29-
compileSdkVersion 29
29+
compileSdkVersion 30
3030

3131
lintOptions {
3232
disable 'InvalidPackage'
@@ -36,7 +36,7 @@ android {
3636
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3737
applicationId "io.crossingthestreams.flutterappauthexample"
3838
minSdkVersion 16
39-
targetSdkVersion 29
39+
targetSdkVersion 30
4040
versionCode flutterVersionCode.toInteger()
4141
versionName flutterVersionName
4242
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

flutter_appauth/example/android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="io.crossingthestreams.flutterappauthexample">
3+
<queries>
4+
<intent>
5+
<action android:name="android.intent.action.VIEW" />
6+
<category android:name="android.intent.category.BROWSABLE" />
7+
<data android:scheme="https" />
8+
</intent>
9+
<intent>
10+
<action android:name="android.intent.action.VIEW" />
11+
<category android:name="android.intent.category.APP_BROWSER" />
12+
<data android:scheme="https" />
13+
</intent>
14+
</queries>
315

416
<!-- The INTERNET permission is required for development. Specifically,
517
flutter needs it to communicate with the running application
@@ -35,4 +47,5 @@
3547
android:name="flutterEmbedding"
3648
android:value="2" />
3749
</application>
50+
3851
</manifest>

flutter_appauth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_appauth
22
description: This plugin provides an abstraction around the Android and iOS AppAuth SDKs so it can be used to communicate with OAuth 2.0 and OpenID Connect providers
3-
version: 0.9.2+4
3+
version: 0.9.2+5
44
homepage: https://github.com/MaikuB/flutter_appauth/tree/master/flutter_appauth
55

66
environment:

0 commit comments

Comments
 (0)