Back to project page CloudyPhone.
The source code is released under:
MIT License
If you think the Android project CloudyPhone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cloudyphone.android.model.contact; //from w w w . j av a 2 s . c o m import java.util.Collection; import org.json.JSONArray; import com.cloudyphone.android.model.MyParseObject; import com.parse.ParseException; import com.parse.SaveCallback; public class ParseContacts extends MyParseObject { private static final String CONTACTS = "contacts"; private Collection<JSONContact> contacts; public ParseContacts(Collection<JSONContact> contacts) { super(ParseContacts.class.getSimpleName()); this.contacts = contacts; } public Collection<JSONContact> getContacts() { return contacts; } @Override public void save() throws ParseException { saveContacts(); super.save(); } @Override public void saveInBackground(SaveCallback callback) { saveContacts(); super.saveInBackground(callback); } private void saveContacts() { put(CONTACTS, new JSONArray(contacts)); } }