public final class TopUpParser extends Parser
Modifier and Type | Class and Description |
---|---|
static class |
TopUpParser.Result |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
CLASS_NAME
Constructor and Description |
---|
TopUpParser() |
Modifier and Type | Method and Description |
---|---|
void |
clearResult()
Clears parser result.
|
TopUpParser |
clone()
Create a copy of the entity.
|
void |
consumeResult(TopUpParser.Result resultToConsume)
Consumes given result.
|
void |
consumeResultFrom(Entity other)
Consume result from other entity.
|
protected void |
deserializeNativeSettings(byte[] serializedSettings) |
protected byte[] |
serializeNativeSettings() |
void |
setAllowNoPrefix(boolean allowNoPrefix)
Indicates whether USSD codes without prefix are allowed.
|
void |
setPrefixAndUssdCodeLength(java.lang.String prefix,
int ussdCodeLength)
Sets the given top up prefix and USSD code length.
|
void |
setReturnCodeWithoutPrefix(boolean returnCodeWithoutPrefix)
Indicates whether
*digits* prefix and # at the end of scanned USSD code will
be returned. |
void |
setTopUpPreset(TopUpPreset preset)
Sets the top up prefix and USSD code length based on the given
TopUpPreset . |
boolean |
shouldAllowNoPrefix()
Indicates whether USSD codes without prefix are allowed.
|
boolean |
shouldReturnCodeWithoutPrefix()
Indicates whether
*digits* prefix and # at the end of scanned USSD code will
be returned. |
protected void |
terminateNative(long nativeContext) |
getPriority, isRequired, setRequired
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
public void setReturnCodeWithoutPrefix(boolean returnCodeWithoutPrefix)
*digits*
prefix and #
at the end of scanned USSD code will
be returned.
By default, this is set to 'false'public boolean shouldReturnCodeWithoutPrefix()
*digits*
prefix and #
at the end of scanned USSD code will
be returned.
By default, this is set to 'false'public void setAllowNoPrefix(boolean allowNoPrefix)
public boolean shouldAllowNoPrefix()
public void setTopUpPreset(@NonNull TopUpPreset preset)
TopUpPreset
. Only
top ups with the chosen prefix and USSD code length in form
*<prefixString>*<USSDCodeLength digits>#
will be parsed.
If top up prefix and USSD code length is not set, top ups with any prefix and USSD code
length can be parsed.preset
- preset that determines top up prefix and USSD code length that will be set.public void setPrefixAndUssdCodeLength(@NonNull java.lang.String prefix, int ussdCodeLength)
*<prefixString>*<USSDCodeLength digits>#
will be parsed.
If top up prefix and USSD code length is not set, top ups with any prefix and USSD code
length can be parsed.prefix
- top up prefixussdCodeLength
- length of the USSD codeprotected void terminateNative(long nativeContext)
terminateNative
in class Entity
@Nullable protected byte[] serializeNativeSettings()
serializeNativeSettings
in class Entity
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
deserializeNativeSettings
in class Entity
public TopUpParser clone()
Entity
RecognizerRunnerView
or RecognizerRunner
with the updated entity hierarchy.public void consumeResultFrom(@NonNull Entity other)
Entity
com.microblink.blinkinput.entities.recognizers.RecognizerBundle#loadFromIntent(Intent)
and similar methods to replace the result content of the saved entities with results that
have arrived over Intent
consumeResultFrom
in class Entity
other
- Entity from which result should be consumed.public void consumeResult(@NonNull TopUpParser.Result resultToConsume)
Parser
consumeResult
in class Parser
resultToConsume
- Result that should be consumed.public void clearResult()
Parser
clearResult
in class Parser