Set, remove, edit, increment, or decrement Profiles attributes on Android

Use the following example code to interact with Profiles attributes.

The Localytics SDK sets an anonymous customer ID for app installs where there is no customer ID explicitly set. If Profiles values are set prior to setting a customer ID, the profile information will be set to the anonymous customer ID for the install and is still available for targeting.
Note: Allowable property names must be Strings and cannot be null, empty strings, or begin with punctuation ("!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"). Property values must be either single instances or arrays of: String, long, or Date.
// to set a profile attribute:
Localytics.setProfileAttribute("Age", 45, Localytics.ProfileScope.ORGANIZATION);
Localytics.setProfileAttribute("Lucky numbers", new long[]{8, 13}, Localytics.ProfileScope.APPLICATION);
Localytics.setProfileAttribute("Birthday", new GregorianCalendar(1962, 11, 23).getTime(), Localytics.ProfileScope.ORGANIZATION);        
Localytics.setProfileAttribute("Upcoming sales calls", new Date[]{new GregorianCalendar(2015, 10, 1).getTime(), new GregorianCalendar(2016, 3, 17).getTime()}, Localytics.ProfileScope.APPLICATION);
Localytics.setProfileAttribute("Hometown", "New York, New York", Localytics.ProfileScope.ORGANIZATION);
Localytics.setProfileAttribute("States visited", new String[]{"New York", "California", "South Dakota"}, Localytics.ProfileScope.APPLICATION);

// to remove a profile attribute:
Localytics.deleteProfileAttribute("Days until graduation", Localytics.ProfileScope.APPLICATION);

// to add a set of values to an already-defined set of values:
Localytics.addProfileAttributesToSet("Lucky numbers", new long[]{666}, Localytics.ProfileScope.APPLICATION);
Localytics.addProfileAttributesToSet("Upcoming sales calls", new Date[]{new GregorianCalendar(2015, 4, 19).getTime(), new GregorianCalendar(2015, 12, 24).getTime()}, Localytics.ProfileScope.APPLICATION);
Localytics.addProfileAttributesToSet("States visited", new String[]{"North Dakota"}, Localytics.ProfileScope.APPLICATION);

// to remove a set of values from an already-defined set of values:
Localytics.removeProfileAttributesFromSet("Lucky numbers", new long[]{8, 666}, Localytics.ProfileScope.APPLICATION);
Localytics.removeProfileAttributesFromSet("Upcoming sales calls", new Date[]{new GregorianCalendar(2016, 3, 17).getTime()}, Localytics.ProfileScope.APPLICATION);
Localytics.removeProfileAttributesFromSet("States visited", new String[]{"California"}, Localytics.ProfileScope.APPLICATION)

// to increment or decrement an already-defined value:
Localytics.incrementProfileAttribute("Age", 1, Localytics.ProfileScope.ORGANIZATION);
Localytics.decrementProfileAttribute("Days until graduation", 3, Localytics.ProfileScope.APPLICATION);