dotnet / dotnet/android-libraries
AndroidX.Credentials ICredentialManagerCallback wrong parameter types.
- Dominant language
- C#
- Stars
- 317
- Forks
- 73
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 17
Description
### Android application type
Classic Xamarin.Android (MonoAndroid12.0, etc.), Android for .NET (net6.0-android, etc.)
### Affected platform version
VS Mac 2022 17.6.9
### Description
The interface ICredentialManagerCallback.cs OnError and OnResult use Java.Lang.Object parameter type.
It should be
onResult(GetCredentialResponse result)
and
onError(GetCredentialException e)
Unfortunately, It is not possible cast.
So, it's impossible to get a proper error message on the c# level.
### Steps to Reproduce
```
ICredentialManager credentialManager = CredentialManager.Companion.Create(this.Context);
CreatePublicKeyCredentialRequest createPublicKeyCredentialRequest = new CreatePublicKeyCredentialRequest(passkeyRequestVO.RequestJson);
credentialManager.CreateCredentialAsync(this.Context, createPublicKeyCredentialRequest, new Android.OS.CancellationSignal(), this, this);
```
```
void ICredentialManagerCallback.OnError(Java.Lang.Object e){ System.Diagnostics.Debug.WriteLine("ICredentialManagerCallback.OnError: " + e);}
void ICredentialManagerCallback.OnResult(Java.Lang.Object result){ System.Diagnostics.Debug.WriteLine("ICredentialManagerCallback.OnResult");}
```

### Did you find any workaround?
nope
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.