Вы находитесь на странице: 1из 12

1. JavaScript is disabled on your browser.

 
Skip navigation links
 
● Overview
● Package
● Class
● Tree
● Deprecated
● Index
● Help

● Prev Class
● Next Class
● Frames
● No Frames
● All Classes
● Summary:
● Nested​ |
● Field​ |
● Constr​ |
● Method
● Detail:
● Field​ |
● Constr​ |
● Method
 
com.samsung.android.sdk.pass

Class SpassFingerprint

● java.lang.Object

○ com.samsung.android.sdk.pass.SpassFingerprint

public class SpassFingerprint 


extends java.lang.Object
This class provides all the fingerprint management functionality.
It provides methods for:
- Inquiring about registered fingerprints.
- Requesting an identify operation to determine whether the current user's fingerprint is
registered on this device.Since: 1.0.0


 
○ Nested Class SummaryNested Classes
Modifier and Type Class and Description
static interface SpassFingerprint.IdentifyListener
This listener interface receives
fingerprint recognition events.
static interface SpassFingerprint.RegisterListener
This listener interface receives
fingerprint registration events.
 
○ Field SummaryFields
Modifier and Type Field and Description
static java.lang.String ACTION_FINGERPRINT_ADDED
Broadcast notifying a registered
fingerprint are added in the device.
static java.lang.String ACTION_FINGERPRINT_REMOVED
Broadcast notifying a registered
fingerprint is removed in the device.
static java.lang.String ACTION_FINGERPRINT_RESET
Broadcast notifying all registered
fingerprints are removed in the device.
static int STATUS_AUTHENTIFICATION_FAILE
D
Status indicating the failure of the
fingerprint recognition due to an
unknown reason.
static int STATUS_AUTHENTIFICATION_PASS
WORD_SUCCESS
Status indicating the success of the
identify operation using an alternative
password instead of a fingerprint.
static int STATUS_AUTHENTIFICATION_SUCC
ESS
Status indicating the success of the
identify operation.
static int STATUS_BUTTON_PRESSED
Status indicating the failure of the
fingerprint recognition due to pressing
the added button in the dialog.
static int STATUS_OPERATION_DENIED
Status indicating that identify request is
denied because of fingerprint service
internally.
static int STATUS_QUALITY_FAILED
Status indicating the failure of the
fingerprint recognition due to the poor
quality of the fingerprint image.
static int STATUS_SENSOR_FAILED
Status indicating the failure of the
fingerprint recognition due to a sensor
error.
static int STATUS_TIMEOUT_FAILED
Status indicating the failure of the
fingerprint recognition due to a timeout.
static int STATUS_USER_CANCELLED
Status indicating the failure of the
fingerprint recognition due to
cancellation of the user.
static int STATUS_USER_CANCELLED_BY_TO
UCH_OUTSIDE
Status indicating the failure of the
fingerprint recognition due to
cancellation of the user by touching the
outside of the dialog.
 
○ Constructor SummaryConstructors
Constructor and Description
SpassFingerprint​(android.content.Context context)
Creates an SpassFingerprint instance.
 
○ Method SummaryAll Methods Instance Methods Concrete
Methods Deprecated Methods
Modifier and Type Method and Description
void cancelIdentify​()
Cancels the requested identify
operation.
void changeStandbyString​(java.lang.String
standbyText)
change a standby string in the UI.
java.lang.String getGuideForPoorQuality​()
Returns the guide when fingerprint
recognition is failed due to the poor
quality.
int getIdentifiedFingerprintIndex​()
Returns the identified fingerprint index
after fingerprint recognition is finished.
android.util.SparseArray<java.lang.Strin getRegisteredFingerprintName​()
g> Returns the list of registered fingerprint
indexes and names in setting menu.
android.util.SparseArray<java.lang.Strin getRegisteredFingerprintUniqueID​()
g> Deprecated.
this feature is no longer supported.
boolean hasRegisteredFinger​()
Checks whether a registered fingerprint
exists on the device.
void registerFinger​(android.content.Context
activityContext,
SpassFingerprint.RegisterListener​ listen
er)
Registers fingerprints by launching the
Enroll screen from the Settings menu.
void setCanceledOnTouchOutside​(boolean
cancel)
Sets whether the dialog is dismissed or
not when touching background
elements.
void setDialogBgTransparency​(int
transparency)
Sets the transparency of background
elements.
void setDialogButton​(java.lang.String
buttonText)
Adds a own button in the UI.
void setDialogIcon​(java.lang.String
iconName)
Add a logo in the UI.
void setDialogTitle​(java.lang.String titleText,
int titleColor)
Adds a title in the UI.
void setIntendedFingerprintIndex​(java.util.Arr
ayList<java.lang.Integer>
requestedIndex)
Sets the designated fingerprint index for
identification before requesting
fingerprint recognition.
void startIdentify​(​SpassFingerprint.IdentifyList
ener​ listener)
Requests the identify operation to
recognize user fingerprints.
void startIdentifyWithDialog​(android.content.
Context activityContext,
SpassFingerprint.IdentifyListener​ listener
, boolean enablePassword)
Requests the identify operation to
recognize the user fingerprint with a user
interface.


  
○ Field Detail
■ STATUS_AUTHENTIFICATION_SUCCESS
public static final int STATUS_AUTHENTIFICATION_SUCCESS
Status indicating the success of the identify operation.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  
STATUS_TIMEOUT_FAILED
public static final int STATUS_TIMEOUT_FAILED
Status indicating the failure of the fingerprint recognition due to a timeout.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  
STATUS_SENSOR_FAILED
public static final int STATUS_SENSOR_FAILED
Status indicating the failure of the fingerprint recognition due to a sensor
error.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  STATUS_USER_CANCELLED
public static final int STATUS_USER_CANCELLED
Status indicating the failure of the fingerprint recognition due to cancellation
of the user.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Untitled document - Google Docs (1).pdf (PDFy mirror) : Free Download,
Borrow, and Streaming : Internet Archive
■  STATUS_BUTTON_PRESSED
public static final int STATUS_BUTTON_PRESSED
Status indicating the failure of the fingerprint recognition due to pressing the
added button in the dialog.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.2.1 See Also:
Constant Field Values
■  STATUS_QUALITY_FAILED
public static final int STATUS_QUALITY_FAILED
Status indicating the failure of the fingerprint recognition due to the poor
quality of the fingerprint image.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  
STATUS_USER_CANCELLED_BY_TOUCH_OUTSIDE
public static final int 
STATUS_USER_CANCELLED_BY_TOUCH_OUTSIDE
Status indicating the failure of the fingerprint recognition due to cancellation
of the user by touching the outside of the dialog.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.1.0 See Also:
Constant Field Values
■  STATUS_AUTHENTIFICATION_FAILED
public static final int STATUS_AUTHENTIFICATION_FAILED
Status indicating the failure of the fingerprint recognition due to an unknown
reason.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  
STATUS_OPERATION_DENIED
public static final int STATUS_OPERATION_DENIED
Status indicating that identify request is denied because of fingerprint service
internally.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.2.1 See Also:
Constant Field Values
■  STATUS_AUTHENTIFICATION_PASSWORD_SUCCESS
public static final int 
STATUS_AUTHENTIFICATION_PASSWORD_SUCCESS
Status indicating the success of the identify operation using an alternative
password instead of a fingerprint.
This value is used for the eventStatus of
SpassFingerprint.IdentifyListener.onFinished(int)​.Since: 1.0.0 See Also:
Constant Field Values
■  ACTION_FINGERPRINT_RESET
public static final java.lang.String 
ACTION_FINGERPRINT_RESET
Broadcast notifying all registered fingerprints are removed in the
device.Since: 1.2.0 See Also: ​Constant Field Values
■  ACTION_FINGERPRINT_REMOVED
public static final java.lang.String 
ACTION_FINGERPRINT_REMOVED
Broadcast notifying a registered fingerprint is removed in the device.
The fingerprint index which fingerprint is removed can be achieved as extra
value of intent fingerIndexSince: 1.2.0 See Also: ​Constant Field Values
■  
ACTION_FINGERPRINT_ADDED
public static final java.lang.String 
ACTION_FINGERPRINT_ADDED
Broadcast notifying a registered fingerprint are added in the device.
The fingerprint index which fingerprint is added can be achieved as extra
value of intent fingerIndexSince: 1.2.0 See Also: ​Constant Field Values
  
○ Constructor Detail
■ SpassFingerprint
public SpassFingerprint(android.content.Context context)
Creates an SpassFingerprint instance.Parameters: context - The Context for
your application.
Throws: java.lang.IllegalArgumentException - Thrown if the Context passed is
null.
java.lang.IllegalArgumentException - Thrown if the Context passed is not
valid.
Since: 1.0.0
  
○ Method Detail
■ cancelIdentify
public void cancelIdentify()
Cancels the requested identify operation.Throws:
java.lang.UnsupportedOperationException - Thrown if the Fingerprint Service
does not exist.
java.lang.IllegalStateException - Thrown if no identify operation has been
requested.
java.lang.IllegalStateException - Thrown if the cancel request to the
Fingerprint Service fails.
Since: 1.0.0
■  
startIdentify
public void 
startIdentify(​SpassFingerprint.IdentifyListener​ listener)
Requests the identify operation to recognize user fingerprints.
This method does not provide a user interface.
All the events related to the identify operation are delivered to the specified
listener instance.Parameters: listener - The listener instance for the identify
operation events.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalArgumentException - Thrown if the listener passed is null.
java.lang.IllegalStateException - Thrown if the client registration or identify
operation fails.
java.lang.IllegalStateException - Thrown if a previous request is still in
progress.
SpassInvalidStateException​ - Thrown with ​STATUS_OPERATION_DENIED
if fingerprint identify Request is denied because request is locked out by
policy.
Since: 1.0.0
■  startIdentifyWithDialog
public void 
startIdentifyWithDialog(android.content.Context 
activityContext, 
 
SpassFingerprint.IdentifyListener​ listener, 
boolean 
enablePassword)
Requests the identify operation to recognize the user fingerprint with a user
interface.
All the events related to the identify operation are delivered on the specified
listener instance.
The events related to this identify operation are identical to the
startIdentify(com.samsung.android.sdk.pass.SpassFingerprint.IdentifyListene
r)​ events.
The user interface permits 5 attempts for recognizing a
fingerprint.Parameters: activityContext - The Context for showing the user
interface.
listener - The listener instance for the identify operation events.
enablePassword - The visibility of the Password button in the user interface.
Set to true to display the Password button, and set to false to hide the
Password button.
Since v1.2.0, it will take effective if return value is true when calling
Spass.isFeatureEnabled(int)​ with
Spass.DEVICE_FINGERPRINT_AVAILABLE_PASSWORD
If return value is false, there will be no effective even if any value is set.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalArgumentException - Thrown if the listener or Context passed
is null.
java.lang.IllegalArgumentException - Thrown if the Context passed is not
valid.
java.lang.IllegalStateException - Thrown if identify operation fails.
Since: 1.0.0
■  hasRegisteredFinger
public boolean hasRegisteredFinger()
Checks whether a registered fingerprint exists on the device.Returns: true - if
registered fingerprints for the current user are found.
false - if no registered fingerprints for the current user are found.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
Since: 1.0.0
■  registerFinger
public void registerFinger(android.content.Context 
activityContext, 
 
SpassFingerprint.RegisterListener​ listener)
Registers fingerprints by launching the Enroll screen from the Settings menu.
This method is used if there are no registered fingerprints on the
device.Parameters: activityContext - The Context for showing the user
interface.
listener - The listener instance for the fingerprint registration events.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalArgumentException - Thrown if the listener or Context passed
is null.
java.lang.IllegalArgumentException - Thrown if the Context passed is not
valid.
Since: 1.0.0
■  
getIdentifiedFingerprintIndex
public int getIdentifiedFingerprintIndex()
Returns the identified fingerprint index after fingerprint recognition is finished.
This API must be called inside
SpassFingerprint.IdentifyListener.onFinished(int)​ onlyReturns: the index of
fingerprint list which is recognized.
0 - if recognition failure or if password recognition successful
1,2,3 - if fingerprint recognition successful
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the fingerprint index is not valid
because the API is called outside
SpassFingerprint.IdentifyListener.onFinished(int)​.
Since: 1.1.0
■  getRegisteredFingerprintName
public android.util.SparseArray<java.lang.String> 
getRegisteredFingerprintName()
Returns the list of registered fingerprint indexes and names in setting
menu.Returns: the array of registered fingerprint index and name.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
Since: 1.1.0
■  getRegisteredFingerprintUniqueID
@Deprecated 
public android.util.SparseArray<java.lang.String> 
getRegisteredFingerprintUniqueID()
Deprecated. this feature is no longer supported.
Return the list of registered fingerprint indexes with own unique ID
value.Returns: the array of registered fingerprint index and own unique ID
value.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware doesn't
support the API.
Since: 1.1.0
■  
setIntendedFingerprintIndex
public void 
setIntendedFingerprintIndex(java.util.ArrayList<java.lang
.Integer> requestedIndex)
Sets the designated fingerprint index for identification before requesting
fingerprint recognition.
This API must be called before
startIdentifyWithDialog(android.content.Context,
com.samsung.android.sdk.pass.SpassFingerprint.IdentifyListener, boolean)
or
startIdentify(com.samsung.android.sdk.pass.SpassFingerprint.IdentifyListene
r)​ onlyParameters: requestedIndex - the list of index designated for fingerprint
recognition.
set to null to get the result of fingerprint recognition for all registered
fingerprints.
set to invalid value to get the result of fingerprint recognition as failure.
set the designated index list for fingerprint recognition about the designated
index
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
Since: 1.1.0
■  setDialogTitle
public void setDialogTitle(java.lang.String titleText, 
int titleColor)
Adds a title in the UI.Parameters: titleText - The title text
titleColor - The title color
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
java.lang.IllegalArgumentException - Thrown if the title text passed is null.
java.lang.IllegalArgumentException - Thrown if the title text passed is longer
than 256 characters.
java.lang.IllegalArgumentException - Thrown if alpha value is not supported
in the titleColor.
Since: 1.1.0
■  setDialogIcon
public void setDialogIcon(java.lang.String iconName)
Add a logo in the UI.Parameters: iconName - The icon image file name
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
java.lang.IllegalArgumentException - Thrown if the iconName passed is null
or not valid.
Since: 1.1.0
■  
setDialogBgTransparency
public void setDialogBgTransparency(int transparency)
Sets the transparency of background elements.Parameters: transparency -
The value of transparency in white color
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
java.lang.IllegalArgumentException - Thrown if the value of transparency
passed is not valid.
Since: 1.1.0
■  setCanceledOnTouchOutside
public void setCanceledOnTouchOutside(boolean cancel)
Sets whether the dialog is dismissed or not when touching background
elements.Parameters: cancel - determines whether the dialog is dismissed or
not when the user touches outside of the dialog.
Set to true to dismiss when touching outside, and set to false to keep the
dialog.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
Since: 1.1.0
■  setDialogButton
public void setDialogButton(java.lang.String buttonText)
Adds a own button in the UI. This API evoke ​STATUS_BUTTON_PRESSED
on ​SpassFingerprint.IdentifyListener.onFinished(int)​.Parameters: buttonText -
The button text
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
java.lang.IllegalArgumentException - Thrown if the button text passed is null.
java.lang.IllegalArgumentException - Thrown if the button text passed is
longer than 32 characters.
Since: 1.2.1
■  changeStandbyString
public void changeStandbyString(java.lang.String 
standbyText)
change a standby string in the UI.Parameters: standbyText - The standby text
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the device firmware does not
support the API.
java.lang.IllegalArgumentException - Thrown if the button text passed is null.
java.lang.IllegalArgumentException - Thrown if the button text passed is
longer than 100 characters.
Since: 1.2.1
■  
getGuideForPoorQuality
public java.lang.String getGuideForPoorQuality()
Returns the guide when fingerprint recognition is failed due to the poor
quality.
This API must be called inside
SpassFingerprint.IdentifyListener.onFinished(int)
and when ​STATUS_QUALITY_FAILED​ is happened onlyReturns: the guide
string regarding the recognition failed reason.
Throws: java.lang.UnsupportedOperationException - Thrown if the Fingerprint
Service does not exist.
java.lang.IllegalStateException - Thrown if the fingerprint String is not valid
because the API is called outside
SpassFingerprint.IdentifyListener.onFinished(int)
or the API is called when ​STATUS_QUALITY_FAILED​ is not happened.
Since: 1.2.1
 
Skip navigation links
●  Overview
● Package
● Class
● Tree
● Deprecated
● Index
● Help

● Prev Class
● Next Class
● Frames
● No Frames
● All Classes
● Summary:
● Nested​ |
● Field​ |
● Constr​ |
● Method
● Detail:
● Field​ |
● Constr​ |
● Method
 
Copyright ⓒ Samsung Electronics Co., Ltd. All rights reserved.

Вам также может понравиться