@capgo/capacitor-autofill-save-password 7.0.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -52,8 +52,8 @@ dependencies {
|
|
|
52
52
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
53
|
implementation project(':capacitor-android')
|
|
54
54
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
-
implementation(libs.androidx.credentials)
|
|
56
|
-
implementation(libs.androidx.credentials.play.services.auth)
|
|
55
|
+
// implementation(libs.androidx.credentials)
|
|
56
|
+
// implementation(libs.androidx.credentials.play.services.auth)
|
|
57
57
|
// implementation 'androidx.credentials:credentials:1.5.0'
|
|
58
58
|
testImplementation "junit:junit:$junitVersion"
|
|
59
59
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
@@ -7,11 +7,11 @@ import com.getcapacitor.PluginMethod;
|
|
|
7
7
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
8
8
|
import android.util.Log;
|
|
9
9
|
import android.os.CancellationSignal;
|
|
10
|
-
import androidx.credentials.CredentialManager;
|
|
11
|
-
import androidx.credentials.CredentialManagerCallback;
|
|
12
|
-
import androidx.credentials.CreatePasswordRequest;
|
|
13
|
-
import androidx.credentials.CreateCredentialResponse;
|
|
14
|
-
import androidx.credentials.exceptions.CreateCredentialException;
|
|
10
|
+
//import androidx.credentials.CredentialManager;
|
|
11
|
+
//import androidx.credentials.CredentialManagerCallback;
|
|
12
|
+
//import androidx.credentials.CreatePasswordRequest;
|
|
13
|
+
//import androidx.credentials.CreateCredentialResponse;
|
|
14
|
+
//import androidx.credentials.exceptions.CreateCredentialException;
|
|
15
15
|
import java.util.concurrent.Executor;
|
|
16
16
|
|
|
17
17
|
@CapacitorPlugin(name = "SavePassword")
|
|
@@ -42,37 +42,37 @@ public class SavePasswordPlugin extends Plugin {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
// Build the CreatePasswordRequest
|
|
46
|
-
CreatePasswordRequest createPasswordRequest = new CreatePasswordRequest(username, password);
|
|
47
|
-
|
|
48
|
-
// Get the CredentialManager instance
|
|
49
|
-
CredentialManager credentialManager = CredentialManager.create(getActivity());
|
|
50
|
-
|
|
51
|
-
// Set up executor and cancellation signal
|
|
52
|
-
Executor executor = getActivity().getMainExecutor();
|
|
53
|
-
CancellationSignal cancellationSignal = new CancellationSignal();
|
|
54
|
-
|
|
55
|
-
credentialManager.createCredentialAsync(
|
|
56
|
-
getActivity(),
|
|
57
|
-
createPasswordRequest,
|
|
58
|
-
cancellationSignal,
|
|
59
|
-
executor,
|
|
60
|
-
new CredentialManagerCallback<CreateCredentialResponse, CreateCredentialException>() {
|
|
61
|
-
@Override
|
|
62
|
-
public void onResult(CreateCredentialResponse result) {
|
|
45
|
+
// // Build the CreatePasswordRequest
|
|
46
|
+
// CreatePasswordRequest createPasswordRequest = new CreatePasswordRequest(username, password);
|
|
47
|
+
//
|
|
48
|
+
// // Get the CredentialManager instance
|
|
49
|
+
// CredentialManager credentialManager = CredentialManager.create(getActivity());
|
|
50
|
+
//
|
|
51
|
+
// // Set up executor and cancellation signal
|
|
52
|
+
// Executor executor = getActivity().getMainExecutor();
|
|
53
|
+
// CancellationSignal cancellationSignal = new CancellationSignal();
|
|
54
|
+
//
|
|
55
|
+
// credentialManager.createCredentialAsync(
|
|
56
|
+
// getActivity(),
|
|
57
|
+
// createPasswordRequest,
|
|
58
|
+
// cancellationSignal,
|
|
59
|
+
// executor,
|
|
60
|
+
// new CredentialManagerCallback<CreateCredentialResponse, CreateCredentialException>() {
|
|
61
|
+
// @Override
|
|
62
|
+
// public void onResult(CreateCredentialResponse result) {
|
|
63
63
|
JSObject response = new JSObject();
|
|
64
64
|
response.put("prompted", true);
|
|
65
65
|
Log.d(TAG, "Password save prompt completed successfully.");
|
|
66
66
|
call.resolve(response);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@Override
|
|
70
|
-
public void onError(CreateCredentialException e) {
|
|
71
|
-
String errorMessage = "Failed to save password credential: " + e.getMessage();
|
|
72
|
-
Log.e(TAG, errorMessage, e);
|
|
73
|
-
call.reject(errorMessage, e);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
);
|
|
67
|
+
// }
|
|
68
|
+
//
|
|
69
|
+
// @Override
|
|
70
|
+
// public void onError(CreateCredentialException e) {
|
|
71
|
+
// String errorMessage = "Failed to save password credential: " + e.getMessage();
|
|
72
|
+
// Log.e(TAG, errorMessage, e);
|
|
73
|
+
// call.reject(errorMessage, e);
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
// );
|
|
77
77
|
}
|
|
78
78
|
}
|
package/package.json
CHANGED