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

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

public final class SMSResultHandler
extends ResultHandler

Handles SMS addresses, offering a choice of composing a new SMS or MMS message.

Author:
dswitkin@google.com (Daniel Switkin)

Field Summary
 
Fields inherited from class com.google.zxing.client.android.result.ResultHandler
MAX_BUTTON_COUNT
 
Constructor Summary
SMSResultHandler(android.app.Activity activity, ParsedResult result)
           
 
Method Summary
 int getButtonCount()
          Indicates how many buttons the derived class wants shown.
 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.
 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
areContentsSecure, getResult, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMSResultHandler

public SMSResultHandler(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.

getDisplayContents

public java.lang.CharSequence getDisplayContents()
Description copied from class: ResultHandler
Create a possibly styled string for the contents of the current barcode.

Overrides:
getDisplayContents in class ResultHandler
Returns:
The text to be displayed.

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.