Ushahidi android app v3.9 problem


#1

1.at the server i can see report with right photo
but at the android app, some photos are repeated

2.when sharing report, there is report ID.
that id is not correct!!! i have 30 reports but that id is up to 600!!


#2

I suspected you’ve hit a bug. If the ID isn’t correct then you’ve hit a but that needs fixing. This needs investigating


#3

I have the same problem, with my android app.


#4

I found the problem. On file ReportsApi.java, line 102, the fileName is using the date/time to create the name for the saved photos. It creates a mess, once a lot of pictures are saved on the same second, with the same name.

My fix is just replace the line:

final String fileName = Util.getDateTime() + ".jpg";

By:

String fileName = m.getLinkUrl().substring(m.getLinkUrl().lastIndexOf('/')+1, m.getLinkUrl().length());

Saving the picture with the same name on the server.


#5

Thank you alessandronunes. You solved my issue too.