com.google.zxing.client.android.result
Class URIResultHandler

java.lang.Object
  extended by com.google.zxing.client.android.result.ResultHandler
      extended by com.google.zxing.client.android.result.URIResultHandler

public final class URIResultHandler
extends ResultHandler

Offers appropriate actions for URLS.

Author:
dswitkin@google.com (Daniel Switkin)

Field Summary
 
Fields inherited from class com.google.zxing.client.android.result.ResultHandler
MAX_BUTTON_COUNT
 
Constructor Summary
URIResultHandler(android.app.Activity activity, ParsedResult result)
           
 
Method Summary
 boolean areContentsSecure()
          Some barcode contents are considered secure, and should not be saved to history, copied to the clipboard, or otherwise persisted.
 int getButtonCount()
          Indicates how many buttons the derived class wants shown.
 int getButtonText(int index)
          The text of the nth action button.
 int getDisplayTitle()
          A string describing the kind of barcode that was found, e.g.
 void handleButtonPress(int index)
          Execute the action which corresponds to the nth button.
 
Methods inherited from class com.google.zxing.client.android.result.ResultHandler
getDisplayContents, getResult, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIResultHandler

public URIResultHandler(android.app.Activity activity,
                        ParsedResult result)
Method Detail

getButtonCount

public int getButtonCount()
Description copied from class: ResultHandler
Indicates how many buttons the derived class wants shown.

Specified by:
getButtonCount in class ResultHandler
Returns:
The integer button count.

getButtonText

public int getButtonText(int index)
Description copied from class: ResultHandler
The text of the nth action button.

Specified by:
getButtonText in class ResultHandler
Parameters:
index - From 0 to getButtonCount() - 1
Returns:
The button text as a resource ID

handleButtonPress

public void handleButtonPress(int index)
Description copied from class: ResultHandler
Execute the action which corresponds to the nth button.

Specified by:
handleButtonPress in class ResultHandler
Parameters:
index - The button that was clicked.

getDisplayTitle

public int getDisplayTitle()
Description copied from class: ResultHandler
A string describing the kind of barcode that was found, e.g. "Found contact info".

Specified by:
getDisplayTitle in class ResultHandler
Returns:
The resource ID of the string.

areContentsSecure

public boolean areContentsSecure()
Description copied from class: ResultHandler
Some barcode contents are considered secure, and should not be saved to history, copied to the clipboard, or otherwise persisted.

Overrides:
areContentsSecure in class ResultHandler
Returns:
If true, do not create any permanent record of these contents.