-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Feature Request: Add prepareGetCredential Method Support for Android Credential Manager
Objective:
Implement the prepareGetCredential method to reduce latency when showing the account selector in the getCredential process on Android 14 or higher.
Tasks:
-
Review API Documentation:
- Study the
prepareGetCredentialmethod in the Android Credential Manager API. - Understand how to create
GetCredentialRequestwith options likegetPublicKeyCredentialOptionandgetPasswordOption.
- Study the
-
Native Android Implementation:
- Implement the
prepareGetCredentialmethod to:- Accept
GetCredentialRequestwith relevant options. - Return a
PrepareGetCredentialResponseobject with cached data.
- Accept
- Implement the
-
Flutter Integration:
- Add a Dart API for this method:
Future<SmartAuthResult> prepareGetCredential(params);
- Define a model for
PrepareGetCredentialResponseto encapsulate cached data results.
- Add a Dart API for this method:
-
Combine with
getCredential:- Ensure
prepareGetCredentialworks seamlessly with the existinggetCredentialAPI. - Use cached data from the
PrepareGetCredentialResponseto reduce latency in UI rendering.
- Ensure
-
Error Handling:
- Handle cases where:
prepareGetCredentialis called on unsupported Android versions.- Invalid or unsupported options are passed.
- Handle cases where:
-
Documentation:
- Update the documentation to explain:
- The purpose of
prepareGetCredential. - Usage examples and supported Android versions.
- The purpose of
- Highlight its benefits for reducing latency in credential selection.
- Update the documentation to explain:
-
Sample App:
- Add a demonstration in the sample app showing how
prepareGetCredentialenhances thegetCredentialflow.
Let me know if this works or needs further refinement!
- Add a demonstration in the sample app showing how
Metadata
Metadata
Assignees
Labels
No labels