com.techventus.server.voice
Class Voice

java.lang.Object
  extended by com.techventus.server.voice.Voice

public class Voice
extends java.lang.Object

The Class Voice. This class is the basis of the entire API and contains all the components necessary to connect and authenticate with Google Voice, place calls and SMS, and pull in the raw data from the account.

Author:
Techventus, LLC

Field Summary
static java.lang.String GOOGLE
          The Constant GOOGLE.
static java.lang.String HOSTED
          The Constant HOSTED.
static java.lang.String HOSTED_OR_GOOGLE
          The Constant HOSTED_OR_GOOGLE.
 boolean PRINT_TO_CONSOLE
          The PRIN t_ t o_ console.
 
Constructor Summary
Voice(java.lang.String user, java.lang.String pass)
          Instantiates a new Voice Object.
Voice(java.lang.String user, java.lang.String pass, java.lang.String source)
          A constructor which which allows a custom source.
Voice(java.lang.String user, java.lang.String pass, java.lang.String source, boolean printDebugIntoToSystemOut)
          Instantiates a new voice.
Voice(java.lang.String user, java.lang.String pass, java.lang.String source, boolean printDebugIntoToSystemOut, java.lang.String accountType)
          Instantiates a new voice.
Voice(java.lang.String user, java.lang.String pass, java.lang.String source, boolean printDebugIntoToSystemOut, java.lang.String accountType, java.lang.String captchaResponse, java.lang.String captchaToken)
          Instantiates a new voice.
Voice(java.lang.String user, java.lang.String pass, java.lang.String source, java.lang.String rnrSee)
          Deprecated. 
 
Method Summary
 java.lang.String call(java.lang.String originNumber, java.lang.String destinationNumber, java.lang.String phoneType)
          Place a call.
 java.lang.String cancelCall(java.lang.String originNumber, java.lang.String destinationNumber, java.lang.String phoneType)
          Cancel a call that was just placed.
 java.lang.String deleteMessage(java.lang.String msgID)
          Delete message.
 java.io.ByteArrayOutputStream downloadVoicemail(java.lang.String msgID)
          Downloads a voicemail.
 java.lang.String getCaptchaToken()
          Gets the captcha token.
 java.lang.String getCaptchaUrl()
          Gets the captcha url.
 ERROR_CODE getError()
          Deprecated. 
 java.lang.String getGeneral()
          Fetches the page Source Code for the Voice homepage.
 java.lang.String getGeneralPage(int page)
          The main Google Voice section is paginated.
 java.util.List<java.lang.String> getGroupSettingsList(boolean forceUpdate)
          Returns the Group list - Lazy.
 java.lang.String getInbox()
          Fetches and returns the raw page source code for the Inbox.
 java.lang.String getInboxPage(int page)
          Gets the inbox page.
 java.lang.String getMissed()
          Gets the missed calls source code.
 java.lang.String getMissedPage(int page)
          Gets the missed page.
 java.lang.String getPhoneNumber()
          Gets the phone number.
 java.lang.String getPlaced()
          Gets the raw source code for the placed calls page.
 java.lang.String getPlacedPage(int page)
          Gets the placed page.
 java.lang.String getRawPhonesInfo()
          Gets the raw phones info.
 java.lang.String getReceived()
          Gets the received calls source code.
 java.lang.String getReceivedPage(int page)
          Gets the received page.
 java.lang.String getRecent()
          Gets the raw page source code for the recent items.
 java.lang.String getRecentPage(int page)
          Gets the recent page.
 java.lang.String getRecorded()
          Gets the page source for the recorded calls.
 java.lang.String getRecordedPage(int page)
          Gets the recorded page.
 AllSettings getSettings(boolean forceUpdate)
          returns all users settings - lazy.
 java.lang.String getSMS()
          Gets the SMS page raw source code.
 java.lang.String getSMSPage(int page)
          Gets the SMS page.
 java.util.Collection<SMSThread> getSMSThreads()
          Gets a collection of SMS threads.
 java.util.Collection<SMSThread> getSMSThreads(java.lang.String response)
          Gets the SMS threads from a given Response Page.
 java.lang.String getSpam()
          Gets the page source for the spam.
 java.lang.String getSpamPage(int page)
          Gets the spam page.
 java.lang.String getStarred()
          Gets the raw page source code for the starred items.
 java.lang.String getStarredPage(int page)
          Gets the starred page.
 java.lang.String getUnreadSMS()
          Gets the unread sms.
 java.lang.String getUnreadSMSPage(int page)
          Gets the unread sms page.
 java.lang.String getUsername()
          Returns the username
 java.lang.String getVoicemail()
          Gets the Voicemail page raw source code.
 java.util.List<Greeting> getVoicemailList(boolean forceUpdate)
          Returns the Greeting list - Lazy
 java.lang.String getVoicemailPage(int page)
          Gets the voicemail page.
 boolean isLoggedIn()
          Fires a Get request for Recent Items.
 void login()
          Login Method to refresh authentication with Google Voice.
 void login(java.lang.String pCaptchaAnswer, java.lang.String pCaptchaToken)
          Use this login method to login - use captchaAnswer to answer a captcha challenge
 java.lang.String markAsRead(java.lang.String msgID)
          Mark a Conversation with a known Message ID as read.
 java.lang.String markUnRead(java.lang.String msgID)
          Mark a Conversation with a known Message ID as unread.
 java.lang.String phoneDisable(int ID)
          Disable one of the the phones attached to the account from ringing.
 java.lang.String phoneEnable(int ID)
          Enables one of the the phones attached to the account from ringing.
 void phonesDisable(int[] IDs)
          Disables multiple phones in one post TODO Test this with multiple phones in an account Make faster - spawn threads Best would be to be able to construct a url which can switch multiple phones at a time.
 void phonesEnable(int[] IDs)
          Enables multiple phones in one post TODO Test this with multiple phones in an account Best would be to be able to construct a url which can switch multiple phones at a time.
 java.lang.String sendSMS(java.lang.String destinationNumber, java.lang.String txt)
          Send an SMS.
 java.lang.String sendSMS(java.lang.String destinationNumber, java.lang.String txt, SMSThread thread)
          Send an SMS.
 java.lang.String sendSMS(java.lang.String destinationNumber, java.lang.String txt, java.lang.String id)
          Send an SMS.
 java.lang.String setCallPresentation(boolean announceCaller)
          Enables/disables the call Announcement setting (general for all phones).
 java.lang.String setDoNotDisturb(boolean dndEnabled)
          Activated or deactivated the Do Not disturb function.
Enable this to send to voicemail all calls made to your Google number.
 java.lang.String setNewGroupSettings(Group group)
          Applies the settings for this group.
 java.lang.String setVoicemailGreetingId(java.lang.String greetingToSet)
          This is the general voicemail greeting callers hear.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_TO_CONSOLE

public boolean PRINT_TO_CONSOLE
The PRIN t_ t o_ console.


GOOGLE

public static final java.lang.String GOOGLE
The Constant GOOGLE.

See Also:
Constant Field Values

HOSTED

public static final java.lang.String HOSTED
The Constant HOSTED.

See Also:
Constant Field Values

HOSTED_OR_GOOGLE

public static final java.lang.String HOSTED_OR_GOOGLE
The Constant HOSTED_OR_GOOGLE.

See Also:
Constant Field Values
Constructor Detail

Voice

@Deprecated
public Voice(java.lang.String user,
                        java.lang.String pass,
                        java.lang.String source,
                        java.lang.String rnrSee)
      throws java.io.IOException
Deprecated. 

Instantiates a new voice. This constructor is deprecated. Try Voice(String user, String pass) which automatically determines rnrSee and assigns a source.

Parameters:
user - the user
pass - the pass
source - the source
rnrSee - the rnr see
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Voice

public Voice(java.lang.String user,
             java.lang.String pass,
             java.lang.String source)
      throws java.io.IOException
A constructor which which allows a custom source. This Constructor enables verbose output.

Parameters:
user - the username in the format of user@gmail.com or user@googlemail.com
pass - the password
source - Short string identifying your application, for logging purposes. This string should take the form: "companyName-applicationName-versionID". See: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Request
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Voice

public Voice(java.lang.String user,
             java.lang.String pass)
      throws java.io.IOException
Instantiates a new Voice Object. This is generally the simplest and preferred constructor. This Constructor enables verbose output.

Parameters:
user - the username in the format of user@gmail.com or user@googlemail.com
pass - the pass
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Voice

public Voice(java.lang.String user,
             java.lang.String pass,
             java.lang.String source,
             boolean printDebugIntoToSystemOut)
      throws java.io.IOException
Instantiates a new voice. Custom Source Variable allowed, and printDebugIntoSystemOut which allows for Verbose output.

Parameters:
user - the username in the format of user@gmail.com or user@googlemail.com
pass - the password
source - the arbitrary source identifier. Can be anything.
printDebugIntoToSystemOut - the print debug into to system out
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Voice

public Voice(java.lang.String user,
             java.lang.String pass,
             java.lang.String source,
             boolean printDebugIntoToSystemOut,
             java.lang.String accountType)
      throws java.io.IOException
Instantiates a new voice. Custom Source Variable allowed, and printDebugIntoSystemOut which allows for Verbose output.

Parameters:
user - the username in the format of user@gmail.com or user@googlemail.com
pass - the password
source - the arbitrary source identifier. Can be anything.
printDebugIntoToSystemOut - the print debug into to system out
accountType - Type of account to request authorization for. Possible values are: Voice.GOOGLE (get authorization for a Google account only) Voice.HOSTED (get authorization for a hosted account only) Voice.HOSTED_OR_GOOGLE (get authorization first for a hosted account; if attempt fails, get authorization for a Google account) Use Voice.HOSTED_OR_GOOGLE if you're not sure which type of account you want authorization for. If the user information matches both a hosted and a Google account, only the hosted account is authorized.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Voice

public Voice(java.lang.String user,
             java.lang.String pass,
             java.lang.String source,
             boolean printDebugIntoToSystemOut,
             java.lang.String accountType,
             java.lang.String captchaResponse,
             java.lang.String captchaToken)
      throws java.io.IOException
Instantiates a new voice. Custom Source Variable allowed, and printDebugIntoSystemOut which allows for Verbose output.

Parameters:
user - the username in the format of user@gmail.com or user@googlemail.com
pass - the password
source - the arbitrary source identifier. Can be anything.
printDebugIntoToSystemOut - the print debug into to system out
accountType - Type of account to request authorization for. Possible values are: Voice.GOOGLE (get authorization for a Google account only) Voice.HOSTED (get authorization for a hosted account only) Voice.HOSTED_OR_GOOGLE (get authorization first for a hosted account; if attempt fails, get authorization for a Google account) Use Voice.HOSTED_OR_GOOGLE if you're not sure which type of account you want authorization for. If the user information matches both a hosted and a Google account, only the hosted account is authorized.
captchaResponse - response to a captcha challenge, set to null if normal login
captchaToken - (optional) token which matches the response/url from the captcha challenge
Throws:
java.io.IOException - Signals that an I/O exception has occurred.
Method Detail

getUsername

public java.lang.String getUsername()
Returns the username

Returns:
username for gvoice account

getVoicemailList

public java.util.List<Greeting> getVoicemailList(boolean forceUpdate)
                                          throws java.io.IOException,
                                                 gvjava.org.json.JSONException
Returns the Greeting list - Lazy

Parameters:
forceUpdate - set to true to force a List update from the server
Returns:
List of Greeting objects
Throws:
java.io.IOException - Signals that an I/O exception has occurred.
gvjava.org.json.JSONException - the jSON exception

getGroupSettingsList

public java.util.List<java.lang.String> getGroupSettingsList(boolean forceUpdate)
                                                      throws java.io.IOException
Returns the Group list - Lazy.

Parameters:
forceUpdate - the force update
Returns:
List of Greeting objects
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSettings

public AllSettings getSettings(boolean forceUpdate)
                        throws gvjava.org.json.JSONException,
                               java.io.IOException
returns all users settings - lazy.

Parameters:
forceUpdate - the force update
Returns:
the settings
Throws:
gvjava.org.json.JSONException - the jSON exception
java.io.IOException - Signals that an I/O exception has occurred.

getInbox

public java.lang.String getInbox()
                          throws java.io.IOException
Fetches and returns the raw page source code for the Inbox.

Returns:
the inbox
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getInboxPage

public java.lang.String getInboxPage(int page)
                              throws java.io.IOException
Gets the inbox page.

Parameters:
page - the page
Returns:
the inbox page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getGeneral

public java.lang.String getGeneral()
                            throws java.io.IOException
Fetches the page Source Code for the Voice homepage. This file contains most of the useful information for the Google Voice Account such as attached PhoneOld info and Contacts.

Returns:
the general
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getGeneralPage

public java.lang.String getGeneralPage(int page)
                                throws java.io.IOException
The main Google Voice section is paginated. Access the raw HTML for specific page of the main section.

Parameters:
page - the page
Returns:
the general page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getStarred

public java.lang.String getStarred()
                            throws java.io.IOException
Gets the raw page source code for the starred items.

Returns:
the starred item page source
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getStarredPage

public java.lang.String getStarredPage(int page)
                                throws java.io.IOException
Gets the starred page.

Parameters:
page - the page
Returns:
the starred page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getRecent

public java.lang.String getRecent()
                           throws java.io.IOException
Gets the raw page source code for the recent items.

Returns:
the recent raw source code
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getRecentPage

public java.lang.String getRecentPage(int page)
                               throws java.io.IOException
Gets the recent page.

Parameters:
page - the page
Returns:
the recent page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSpam

public java.lang.String getSpam()
                         throws java.io.IOException
Gets the page source for the spam.

Returns:
the spam
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSpamPage

public java.lang.String getSpamPage(int page)
                             throws java.io.IOException
Gets the spam page.

Parameters:
page - the page
Returns:
the spam page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getRecorded

public java.lang.String getRecorded()
                             throws java.io.IOException
Gets the page source for the recorded calls.

Returns:
the recorded
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getRecordedPage

public java.lang.String getRecordedPage(int page)
                                 throws java.io.IOException
Gets the recorded page.

Parameters:
page - the page
Returns:
the recorded page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getPlaced

public java.lang.String getPlaced()
                           throws java.io.IOException
Gets the raw source code for the placed calls page.

Returns:
the placed calls source code
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getPlacedPage

public java.lang.String getPlacedPage(int page)
                               throws java.io.IOException
Gets the placed page.

Parameters:
page - the page
Returns:
the placed page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getReceived

public java.lang.String getReceived()
                             throws java.io.IOException
Gets the received calls source code.

Returns:
the received
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getReceivedPage

public java.lang.String getReceivedPage(int page)
                                 throws java.io.IOException
Gets the received page.

Parameters:
page - the page
Returns:
the received page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getMissed

public java.lang.String getMissed()
                           throws java.io.IOException
Gets the missed calls source code.

Returns:
the missed
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getMissedPage

public java.lang.String getMissedPage(int page)
                               throws java.io.IOException
Gets the missed page.

Parameters:
page - the page
Returns:
the missed page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getUnreadSMS

public java.lang.String getUnreadSMS()
                              throws java.io.IOException
Gets the unread sms.

Returns:
the unread sms
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getUnreadSMSPage

public java.lang.String getUnreadSMSPage(int page)
                                  throws java.io.IOException
Gets the unread sms page.

Parameters:
page - the page
Returns:
the unread sms page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getVoicemail

public java.lang.String getVoicemail()
                              throws java.io.IOException
Gets the Voicemail page raw source code.

Returns:
the Voicemail
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getVoicemailPage

public java.lang.String getVoicemailPage(int page)
                                  throws java.io.IOException
Gets the voicemail page.

Parameters:
page - the page
Returns:
the voicemail page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

downloadVoicemail

public java.io.ByteArrayOutputStream downloadVoicemail(java.lang.String msgID)
                                                throws java.io.IOException
Downloads a voicemail.

Parameters:
msgID - the msg id
Returns:
byte output stream
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSMS

public java.lang.String getSMS()
                        throws java.io.IOException
Gets the SMS page raw source code.

Returns:
the sMS
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSMSPage

public java.lang.String getSMSPage(int page)
                            throws java.io.IOException
Gets the SMS page.

Parameters:
page - the page
Returns:
the sMS page
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSMSThreads

public java.util.Collection<SMSThread> getSMSThreads()
                                              throws java.io.IOException
Gets a collection of SMS threads. Each SMS thread has a collection of SMS objects which contains contact, text and timestamp information.

Returns:
a collection of SMS threads.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getSMSThreads

public java.util.Collection<SMSThread> getSMSThreads(java.lang.String response)
Gets the SMS threads from a given Response Page.

Parameters:
response - the response
Returns:
the SMS threads

getPhoneNumber

public java.lang.String getPhoneNumber()
Gets the phone number.

Returns:
the phone number

getRawPhonesInfo

public java.lang.String getRawPhonesInfo()
                                  throws java.io.IOException
Gets the raw phones info.

Returns:
the raw phones info
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

call

public java.lang.String call(java.lang.String originNumber,
                             java.lang.String destinationNumber,
                             java.lang.String phoneType)
                      throws java.io.IOException
Place a call.

Parameters:
originNumber - the origin number
destinationNumber - the destination number
phoneType - the phone type, this is a number such as 1,2,7 formatted as a String
Returns:
the raw response string received from Google Voice.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

cancelCall

public java.lang.String cancelCall(java.lang.String originNumber,
                                   java.lang.String destinationNumber,
                                   java.lang.String phoneType)
                            throws java.io.IOException
Cancel a call that was just placed.

Parameters:
originNumber - the origin number
destinationNumber - the destination number
phoneType - the phone type
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

markAsRead

public java.lang.String markAsRead(java.lang.String msgID)
                            throws java.io.IOException
Mark a Conversation with a known Message ID as read.

Parameters:
msgID - the msg id
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

markUnRead

public java.lang.String markUnRead(java.lang.String msgID)
                            throws java.io.IOException
Mark a Conversation with a known Message ID as unread.

Parameters:
msgID - the msg id
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

deleteMessage

public java.lang.String deleteMessage(java.lang.String msgID)
                               throws java.io.IOException
Delete message.

Parameters:
msgID - the msg id
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

phonesEnable

public void phonesEnable(int[] IDs)
                  throws java.io.IOException
Enables multiple phones in one post TODO Test this with multiple phones in an account Best would be to be able to construct a url which can switch multiple phones at a time.

Parameters:
IDs - Array of Phones to enable
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

phoneEnable

public java.lang.String phoneEnable(int ID)
                             throws java.io.IOException
Enables one of the the phones attached to the account from ringing. Requires the internal ID for that phone, as an integer, usually 1,2,3, etc.

Parameters:
ID - the iD
Returns:
the raw response of the enable action.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

phonesDisable

public void phonesDisable(int[] IDs)
                   throws java.io.IOException
Disables multiple phones in one post TODO Test this with multiple phones in an account Make faster - spawn threads Best would be to be able to construct a url which can switch multiple phones at a time.

Parameters:
IDs - Array of Phones to disable
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

phoneDisable

public java.lang.String phoneDisable(int ID)
                              throws java.io.IOException
Disable one of the the phones attached to the account from ringing. Requires the internal ID for that phone, as an integer, usually 1,2,3, etc.

Parameters:
ID - the iD
Returns:
the raw response of the disable action.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

setCallPresentation

public java.lang.String setCallPresentation(boolean announceCaller)
                                     throws java.io.IOException
Enables/disables the call Announcement setting (general for all phones).

Parameters:
announceCaller -
true Announces caller's name and gives answering options
false Directly connects calls when phones are answered
Returns:
the raw response of the disable action.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

setVoicemailGreetingId

public java.lang.String setVoicemailGreetingId(java.lang.String greetingToSet)
                                        throws java.io.IOException
This is the general voicemail greeting callers hear.

Parameters:
greetingToSet -
number of the greeting to choose
Returns:
the raw response of the disable action.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

setDoNotDisturb

public java.lang.String setDoNotDisturb(boolean dndEnabled)
                                 throws java.io.IOException
Activated or deactivated the Do Not disturb function.
Enable this to send to voicemail all calls made to your Google number.

Parameters:
dndEnabled - true to enable dnd, false to disable it
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

setNewGroupSettings

public java.lang.String setNewGroupSettings(Group group)
                                     throws java.io.IOException
Applies the settings for this group.

Parameters:
group - the group
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

sendSMS

public java.lang.String sendSMS(java.lang.String destinationNumber,
                                java.lang.String txt,
                                java.lang.String id)
                         throws java.io.IOException
Send an SMS.

Parameters:
destinationNumber - the destination number
txt - the Text of the message. Messages longer than the allowed character length will be split into multiple messages.
id - the Text of the message. Messages longer than the allowed character length will be split into multiple messages.
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

sendSMS

public java.lang.String sendSMS(java.lang.String destinationNumber,
                                java.lang.String txt,
                                SMSThread thread)
                         throws java.io.IOException
Send an SMS.

Parameters:
destinationNumber - the destination number
txt - the Text of the message. Messages longer than the allowed character length will be split into multiple messages.
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

sendSMS

public java.lang.String sendSMS(java.lang.String destinationNumber,
                                java.lang.String txt)
                         throws java.io.IOException
Send an SMS.

Parameters:
destinationNumber - the destination number
txt - the Text of the message. Messages longer than the allowed character length will be split into multiple messages.
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

login

public void login()
           throws java.io.IOException
Login Method to refresh authentication with Google Voice.

Throws:
java.io.IOException - Signals that an I/O exception has occurred.

login

public void login(java.lang.String pCaptchaAnswer,
                  java.lang.String pCaptchaToken)
           throws java.io.IOException
Use this login method to login - use captchaAnswer to answer a captcha challenge

Parameters:
pCaptchaAnswer - (optional) String entered by the user as an answer to a CAPTCHA challenge. - null to make a normal login attempt
pCaptchaToken - (optional) token which matches the response/url from the captcha challenge
Throws:
java.io.IOException - if login encounters a connection error

getError

@Deprecated
public ERROR_CODE getError()
Deprecated. 

Gets the error.

Returns:
the error

getCaptchaUrl

public java.lang.String getCaptchaUrl()
Gets the captcha url.

Returns:
the captcha url

getCaptchaToken

public java.lang.String getCaptchaToken()
Gets the captcha token.

Returns:
the captcha token

isLoggedIn

public boolean isLoggedIn()
Fires a Get request for Recent Items. If the Response requests login authentication or if an exception is thrown, a false is returned, otherwise if arbitrary text is contained for a logged in account, a true is returned. TODO Examine methodology.

Returns:
true, if is logged in