|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.zxing.client.android.result.ResultHandler
public abstract class ResultHandler
A base class for the Android-specific barcode handlers. These allow the app to polymorphically suggest the appropriate actions for each data type. This class also contains a bunch of utility methods to take common actions like opening a URL. They could easily be moved into a helper object, but it can't be static because the Activity instance is needed to launch an intent.
Field Summary | |
---|---|
static int |
MAX_BUTTON_COUNT
|
Method Summary | |
---|---|
boolean |
areContentsSecure()
Some barcode contents are considered secure, and should not be saved to history, copied to the clipboard, or otherwise persisted. |
abstract int |
getButtonCount()
Indicates how many buttons the derived class wants shown. |
abstract int |
getButtonText(int index)
The text of the nth action button. |
java.lang.CharSequence |
getDisplayContents()
Create a possibly styled string for the contents of the current barcode. |
abstract int |
getDisplayTitle()
A string describing the kind of barcode that was found, e.g. |
ParsedResult |
getResult()
|
ParsedResultType |
getType()
A convenience method to get the parsed type. |
abstract void |
handleButtonPress(int index)
Execute the action which corresponds to the nth button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_BUTTON_COUNT
Method Detail |
---|
public ParsedResult getResult()
public abstract int getButtonCount()
public abstract int getButtonText(int index)
index
- From 0 to getButtonCount() - 1
public abstract void handleButtonPress(int index)
index
- The button that was clicked.public boolean areContentsSecure()
public java.lang.CharSequence getDisplayContents()
public abstract int getDisplayTitle()
public final ParsedResultType getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |