flutter_web_auth icon indicating copy to clipboard operation
flutter_web_auth copied to clipboard

Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present

Open arrmani88 opened this issue 3 years ago • 2 comments

First of all thanks for this package. In the documentation that's provided in pub.dev it's mentioned that the following activity needs to be added to my AndroidManifest.xml:

    <activity android:name="com.linusu.flutter_web_auth.CallbackActivity" >
      <intent-filter android:label="flutter_web_auth">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="YOUR_CALLBACK_URL_SCHEME_HERE" />
      </intent-filter>
    </activity>

This causes an error, because when you use intent-filter starting from android 12 (SDK 31), the attribute android:exported must be set explicitly to false or true. So I think this needs to be added to the documentation:

       <activity
           android:name="com.linusu.flutter_web_auth.CallbackActivity"
           android:exported="true"> <!--THIS SHOULD BE ADDED-->

arrmani88 avatar Mar 17 '22 08:03 arrmani88

What stops you from adding this when you declaring com.linusu.flutter_web_auth.CallbackActivity ?

Alex-Dobrynin avatar Mar 24 '22 13:03 Alex-Dobrynin

android:exported="true"

I believe he is saying that the documentation needs to be updated. He is not saying he cannot add it.

pchasco avatar Sep 14 '22 17:09 pchasco

Documentation is updated! 🎉

LinusU avatar Nov 01 '22 08:11 LinusU