Skip to content

Unable to use ActivityResultLauncher<T> and ActivityResultContract<Input, Output> in Xamarin android. #288

@nileshnets

Description

@nileshnets

Version Information

  • Visual Studio version (Microsoft Visual Studio Community 2019 Version 16.9.0):
  • Xamarin.Android version (eg. 10):
  • Support Libraries version (eg 28.0.0):

Describe your Issue:

I have a native Android AAR which has API made by using ActivityResultLauncher and ActivityResultContract<Input, Output>. When trying to consume the API I get the error in Xamarin for ActivityResultLauncher "Cannot convert non-generic type to generic". It recognizes only ActivityResultLauncher. And the custom class made by extending ActivityResultContract<Input, Output>is not generated in the DLL from in the binding project.

Steps to Reproduce (with link to sample solution if possible):

Include any relevant Exception Stack traces, build logs, adb logs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions