Skip to content

Instantly share code, notes, and snippets.

@eyedol
Last active December 21, 2015 17:19
Show Gist options
  • Save eyedol/6340085 to your computer and use it in GitHub Desktop.
Save eyedol/6340085 to your computer and use it in GitHub Desktop.
How to extend Ushahidi reports field
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