plus_plugins
plus_plugins copied to clipboard
[android_intent_plus] canResolveActivity() returns false in targetSdkVersion>=30
System info
Platform the Issue occurs on: Android Plugin name: android_intent_plus Plugin version: 3.1.1
Steps to Reproduce
- Create flutter project
- Add plugin to dependencies
- Create intent object with action: 'android.intent.action.MAIN' or another for one app
- The method canResolveActivity() always return false
Logs
Flutter doctor output
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale
es-419)
[✓] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.66.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
Doing some research I found the following link:
Add the following to my app's manifest and it seems to work.
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
<intent>
<action android:name="android.action.start.flutter.activity" />
</intent>
</queries>
Will we have to add each action in our manifest to fix it?
Any update?...
Looks like there's nothing we can do but add documentation for that function with links to Android docs
As explained by @charafau this is an Android OS change developers will have to handle individually, so now the documentation explains how.