Last active
December 21, 2015 17:19
-
-
Save eyedol/6340085 to your computer and use it in GitHub Desktop.
How to extend Ushahidi reports field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyReportFields extends ReportFields { | |
@FormField(name="extraInfo") | |
private String extraInfo; | |
public void setExtraInfo(String extraInfo) { | |
this.extraInfo = extraInfo; | |
} | |
public String getExtraInfo() { | |
return this.extraInfo; | |
} | |
} | |
//then to pass this to ushahid do | |
MyReportFields fields = new MyReportFields(); | |
fields.fill(i); | |
fields.addCategory(7); | |
fields.addPhotos(new File("/sdcard/photo0.jpg")); | |
fields.setExtraInfo("Our extra info about water sanitation"); | |
Response response = task.submit(fields); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment