Skip to content

Commit

Permalink
[flutter_appauth] add info for apps targeting Android 11 or newer (Ma…
Browse files Browse the repository at this point in the history
…ikuB#144)

* add info for app targeting Android 11 or newer

* add info on bumping SDK versions to changelog
  • Loading branch information
MaikuB authored Sep 27, 2020
1 parent 4977dfc commit a08796a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 4 deletions.
6 changes: 6 additions & 0 deletions flutter_appauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.9.2+5

* Updated the Android setup section in the readme to include information for apps targeting Android 11 (API 30) or newer
* [Android] bumped compile SDK version for the plugin to 30
* Updated example app to use compile and target SDK version 30

## 0.9.2+4

* [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)
Expand Down
18 changes: 18 additions & 0 deletions flutter_appauth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ android {

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.

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


```xml
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.APP_BROWSER" />
<data android:scheme="https" />
</intent>
</queries>
```

## iOS setup

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
Expand Down
2 changes: 1 addition & 1 deletion flutter_appauth/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 29
compileSdkVersion 30

defaultConfig {
minSdkVersion 16
Expand Down
4 changes: 2 additions & 2 deletions flutter_appauth/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


android {
compileSdkVersion 29
compileSdkVersion 30

lintOptions {
disable 'InvalidPackage'
Expand All @@ -36,7 +36,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.crossingthestreams.flutterappauthexample"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
13 changes: 13 additions & 0 deletions flutter_appauth/example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.crossingthestreams.flutterappauthexample">
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.APP_BROWSER" />
<data android:scheme="https" />
</intent>
</queries>

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand Down Expand Up @@ -35,4 +47,5 @@
android:name="flutterEmbedding"
android:value="2" />
</application>

</manifest>
2 changes: 1 addition & 1 deletion flutter_appauth/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_appauth
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
version: 0.9.2+4
version: 0.9.2+5
homepage: https://github.com/MaikuB/flutter_appauth/tree/master/flutter_appauth

environment:
Expand Down

0 comments on commit a08796a

Please sign in to comment.