plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[android_intent_plus] canResolveActivity() returns false in targetSdkVersion>=30

Open saulrmzlpz opened this issue 3 years ago • 2 comments

System info

Platform the Issue occurs on: Android Plugin name: android_intent_plus Plugin version: 3.1.1

Steps to Reproduce

  1. Create flutter project
  2. Add plugin to dependencies
  3. Create intent object with action: 'android.intent.action.MAIN' or another for one app
  4. 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!

saulrmzlpz avatar Apr 29 '22 22:04 saulrmzlpz

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?

saulrmzlpz avatar Apr 29 '22 22:04 saulrmzlpz

Any update?...

saulrmzlpz avatar Aug 09 '22 17:08 saulrmzlpz

Looks like there's nothing we can do but add documentation for that function with links to Android docs

charafau avatar Oct 07 '22 13:10 charafau

As explained by @charafau this is an Android OS change developers will have to handle individually, so now the documentation explains how.

miquelbeltran avatar Oct 07 '22 17:10 miquelbeltran