Skip to content
Travis Wyatt edited this page Jun 13, 2015 · 2 revisions

Usage Examples

Login

GV gv = new GV();
gv.login(USERNAME, PASSWORD);

List Phones

After performing the login procedure outlined above, settings (which includes phone details) can be retrieved from Google Voice.

Settings settings = gv.fetchSettings();
for (Phone phone : settings.getPhones()) {
	System.out.println(phone);
}

Enable/Disable Phone

After retrieving the Google Voice settings with the procedure outlined above, any phone can be enabled or disabled by using either of the following calls:

gv.enablePhone(phone);

or

gv.disablePhone(phone);

Upon successful execution, the phone object will reflect the new state and can be verified as such:

System.out.println("Phone is now " + (phone.isEnabled() ? "enabled" : "disabled"));
Clone this wiki locally