package com.cordova.plugin.samsung.pass;

import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;

import com.samsung.android.sdk.SsdkUnsupportedException;
import com.samsung.android.sdk.pass.Spass;
import com.samsung.android.sdk.pass.SpassFingerprint;
import com.samsung.android.sdk.pass.SpassInvalidStateException;

public class SamsungPassPlugin extends CordovaPlugin {

}

@@ -66,339 +66,2106 @@
 va.C
-ordovaPlugin;%0Aimport org.apache.cordova.CallbackContext;%0A%0Aimport com.samsung.android.sdk.SsdkUnsupportedException;%0Aimport com.samsung.android.sdk.pass.Spass;%0Aimport com.samsung.android.sdk.pass.SpassFingerprint;%0Aimport com.samsung.android.sdk.pass.SpassInvalidStateException;%0A%0Apublic class SamsungPassPlugin extends CordovaPlugin %7B%0A
+allbackContext;%0Aimport org.apache.cordova.CordovaArgs;%0Aimport org.apache.cordova.CordovaInterface;%0Aimport org.apache.cordova.CordovaPlugin;%0Aimport org.apache.cordova.CordovaWebView;%0Aimport org.apache.cordova.PluginResult;%0Aimport org.json.JSONException;%0A%0Aimport android.util.Log;%0A%0Aimport com.samsung.android.sdk.SsdkUnsupportedException;%0Aimport com.samsung.android.sdk.pass.Spass;%0Aimport com.samsung.android.sdk.pass.SpassFingerprint;%0Aimport com.samsung.android.sdk.pass.SpassInvalidStateException;%0A%0Apublic class SamsungPassPlugin extends CordovaPlugin %7B%0A%0A    private Spass mSpass;%0A    private SpassFingerprint mSpassFingerprint;%0A    private boolean isFeatureEnabled = false;%0A    private static final String TAG = %22SamsungPassPlugin%22;%0A%0A    @Override%0A    public void initialize(final CordovaInterface cordova, CordovaWebView webView) %7B%0A%0A        mSpass = new Spass();%0A%0A        try %7B%0A            mSpass.initialize(this.cordova.getActivity().getApplicationContext());%0A            Log.d(TAG, %22Spass was Initialized%22);%0A        %7D catch (SsdkUnsupportedException e) %7B%0A            Log.d(TAG, %22Spass could not initialize%22 + e);%0A        %7D%0A%0A        isFeatureEnabled = mSpass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT);%0A        %0A        if (isFeatureEnabled) %7B%0A            mSpassFingerprint = new SpassFingerprint(this.cordova.getActivity().getApplicationContext());%0A            Log.d(TAG, %22mSpassFingerprint was Initialized%22);%0A        %7D else %7B%0A            Log.d(TAG, %22Fingerprint Service is not supported in the device.%22);%0A        %7D%0A    %7D%0A%0A    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException %7B%0A        %0A        this.callbackContext = callbackContext;%0A%0A        Log.d(TAG, callbackContext.getCallbackId() + %22: %22 + action);%0A%0A        if (action.equals(%22CheckSamsungPassSupport%22)) %7B%0A            this.checkSamsungPassSupport();%0A        %7D%0A        else %7B%0A            return false;%0A        %7D%0A%0A        return true;%0A    %7D%0A%0A    private void checkSamsungPassSupport() %7B%0A         this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));%0A    %7D
 %0A%7D%0A

Initialize Spass, add excute function and test method