Back to project page notes.
The source code is released under:
Apache License
If you think the Android project notes 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.donnemartin.android.notes.notes; //from www . ja v a 2 s . c o m import org.json.JSONException; import org.json.JSONObject; public class Photo { private static final String JSON_FILENAME = "filename"; private String mFileName; public Photo(String fileName) { mFileName = fileName; } public Photo(JSONObject json) throws JSONException { mFileName = json.getString(JSON_FILENAME); } public JSONObject toJSON() throws JSONException { JSONObject json = new JSONObject(); json.put(JSON_FILENAME, mFileName); return json; } public String getFileName() { return mFileName; } }