Code example for ContentValues

Methods: getAsString

0
        public String region;
        public String postcode;
        public String country;
 
        public void fromValues(ContentValues values) {
            street = values.getAsString(StructuredPostal.STREET);
            pobox = values.getAsString(StructuredPostal.POBOX);
            neighborhood = values.getAsString(StructuredPostal.NEIGHBORHOOD);
            city = values.getAsString(StructuredPostal.CITY);
            region = values.getAsString(StructuredPostal.REGION);
            postcode = values.getAsString(StructuredPostal.POSTCODE);
            country = values.getAsString(StructuredPostal.COUNTRY);
        } 
 
        public void toValues(ContentValues values) {
            values.put(StructuredPostal.STREET, street);
            values.put(StructuredPostal.POBOX, pobox);
            values.put(StructuredPostal.NEIGHBORHOOD, neighborhood);
            values.put(StructuredPostal.CITY, city);
            values.put(StructuredPostal.REGION, region);
            values.put(StructuredPostal.POSTCODE, postcode);