Hi,
We are using the GDATA Java API to provision users into google. We are
using the UserEntry object. How can I add a user's phone numbers for
example to their account? I tried the below but it does not appear to
work.
mobile = new PhoneNumber();
mobile.setPrimary(false);
mobile.setRel("
http://schemas.google.com/g/2005#mobile");
mobile.setLabel("Mobile number");
mobile.setPhoneNumber(user.getMobileNumber());
entry.addRepeatingExtension(mobile);
THEN on the the retrieve side: (nothing is ever in the returned List)
after a subsequent refetch of the created UserEntry
List<PhoneNumber> phones =
entry.getRepeatingExtension(PhoneNumber.class);
if (phones != null) {
for (PhoneNumber p : phones) {
if (p.getPrimary()) {
// do something with this primary #
} else {
// do something with this mobile #
}
}
}