How to add GContact to the MyContacts group

To add a contact to a group:


var
  gc: TGContact;
  gcg: TGContactGroup;

    gc := TMSFMXCloudGContacts1.Contacts[0];
    gcg := gc.Groups.Add;
    gcg.ID := TMSFMXCloudGContacts1.Groups[0].ID;

    TMSFMXCloudGContacts1.Update(gc);

This is demonstrated in the GContactsDemo application.