Skip to content

Missing Activity.getOnBackPressedDispatcher #7666

@kairusds

Description

@kairusds

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

VS 22 17.4.3

Description

I tried typing GetOnBackPressedDispatcher inside of a class that extends Xamarin.AndroidX's AppCompatActivity class and the method doesnt seem to exist because there's no autocomplete and an error of appears on the same line.

This method is also crucial as OnBackPressed has been deprecated in Android 13.

IMG_20230105_195333

Steps to Reproduce

  1. Create a Xamarin Blank Android app
  2. Insert the code inside of a method in the MainActivity class

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions