Changing the Report submission UI in GeoReporter Android App

59 views
Skip to first unread message

Sarthak Mehrish

unread,
Aug 18, 2014, 7:31:44 AM8/18/14
to open311...@googlegroups.com
Hey,

While using the GeoReported Android Application i noticed that submitting a report is a long process. And have an idea of changing it into something less complicated and quick. Instead of launching activities one after another we can just replace it by a dialog fragment and make the user input all the details there.I have started working on it but because of no server i cant reach the report submission screen so that i can test my code. So is there any testing server available where i can test my code .?

Any help/guide will be really helpful

Thanks 
sarthakmeh

Cliff Ingham

unread,
Aug 18, 2014, 8:39:05 AM8/18/14
to open311...@googlegroups.com
Hey, thanks for your interest in contributing to the project.

Setting up your own server is a bit complicated, but you're welcome to do so.  You would use our uReport web appllication.  It has fairly complete installation instructions in it's Wiki.

I can also email you directly with an api_key to our test server.  That would let you post and see the results online.

I had recently started looking at updating the Android version.  It has not been touched in a long time.  I started to work on it last week, but got pulled off again.  I am thinking time has come to just drop support for old phones.  I'm thinking of only supporting Android 4.2 and above from now on.

Sarthak Mehrish

unread,
Aug 18, 2014, 8:49:32 AM8/18/14
to open311...@googlegroups.com
Hey 

I would be lucky if in anyway i could contribute to your project.Please send me the api_key at sartha...@gmail.com and also send the link where i can see the reports being submitted so that i can test my code and send you pull request for the same.

Sarthak Mehrish

unread,
Aug 21, 2014, 8:57:32 AM8/21/14
to open311...@googlegroups.com
Hey 

I have made the change .Now user can enter all the details on single dialog box instead of opening a new activity everytime. I have attached the screenshots please take a look and if you like it then il continue my work. 

I hope you like it.

Thanks
new_report1.png
new_report2.png
new_report3.png

Sarthak Mehrish

unread,
Aug 21, 2014, 9:00:35 AM8/21/14
to open311...@googlegroups.com
I dont think there would be any problem with complicated questions. They would be displayed in the same way as it does now in the app only the difference would be they would on same activity/dialog. 

If scrolling the dialog is not good. I can convert it into an activity. 

I made the change because i felt going to another activity every time and hitting save button makes it a tedious task. 

Cliff Ingham

unread,
Aug 21, 2014, 10:08:36 AM8/21/14
to open311...@googlegroups.com
I agree, going to a seperate activity for each field of the report is probably a bit too tedious. I can see it makes sense to put all the make all the fields editable in a single activity, rather than going to seperate activity for each field.

Well, the Location and Camera still have to be a seperate activity....but for all the rest, they can probably be entered on the report activity itself.

Sarthak Mehrish

unread,
Aug 21, 2014, 1:22:30 PM8/21/14
to open311...@googlegroups.com
Okay i'll continue my work then.


On Monday, August 18, 2014 5:01:44 PM UTC+5:30, Sarthak Mehrish wrote:

Sarthak Mehrish

unread,
Aug 24, 2014, 12:55:27 PM8/24/14
to open311...@googlegroups.com
Hey

While i was working on open 311 - android application and changing the report submission UI i encountered few things that i would like to discuss.

Currently the report submission is ListView(screenshot attached) and in the getView method switch case is used which changes the items in the ListView as per the requirement. So my question is wouldn't be the use of linear layout placed above each other better ? Wont it be more optimise than using ListView when we have different layouts for each row.?

My idea of implementing the same using Linear Layout is as follows - :

1. Read the response and accordingly design the layout .For MEDIA a linear layout containing camera image in the center can be used , For Location linear layout containing a TextView can be used and so on.
2. Place the linear layouts above each other like a list.  For e.g if the report includes media than inflate the media layout on the top. If it includes a description/details of user than inflate other layout just below it.

I would also like to know if there is any other optimise solution when working on these kind of things.

Also does any api for open 311-android exist where i can see the response .

Thanks
before report screen.png

Cliff Ingham

unread,
Aug 25, 2014, 9:01:50 AM8/25/14
to open311...@googlegroups.com
Yes, it sounds like a linear layout could work very well for the report.  It might even simplify things a bit, since you might not need the ServiceRequestAdapter anymore.

Keep in mind the Media, Location, and Description are the default set of parameters for all ServiceRequests.  After that, all the rest of the fields are described in the Attributes of the Service Definition.
Message has been deleted
Message has been deleted

Sarthak Mehrish

unread,
Aug 29, 2014, 2:54:32 PM8/29/14
to open311...@googlegroups.com
Hey

I have implemented the submission of report on single activity and is working pretty fine . I have tested and everything is working good. So i just wanted to know what things i should keep in mind while sending pull request . Should there be no logs ? And gen folder should be removed.? Is there anything else i should take care of. 


Sarthak Mehrish

unread,
Sep 2, 2014, 7:50:07 AM9/2/14
to open311...@googlegroups.com
I have submitted a pull request Below is the link. Will be waiting for your reviews.


Thanks 

Cliff Ingham

unread,
Sep 2, 2014, 8:47:41 AM9/2/14
to open311...@googlegroups.com
I'm very busy at work with other projects right now.  I will try and review the pull request this week or next week.

Sarthak Mehrish

unread,
Sep 2, 2014, 1:50:09 PM9/2/14
to open311...@googlegroups.com
Okay.

Cliff Ingham

unread,
Sep 2, 2014, 3:03:49 PM9/2/14
to open311...@googlegroups.com
I need to delete your api_key since it is now public on Github.

On 09/02/2014 01:50 PM, Sarthak Mehrish wrote:
> Okay.
>
Message has been deleted

Sarthak Mehrish

unread,
Sep 13, 2014, 9:31:03 AM9/13/14
to open311...@googlegroups.com
Hey Cliff,

Please send me a new api key to your test server so that i can see results online.

Thanks.

Sarthak Mehrish

unread,
Sep 29, 2014, 2:04:39 PM9/29/14
to open311...@googlegroups.com
Hey

Sorry i was busy with my papers so got delayed in changing the code.
I have created a new pull request with changes you asked. I have pulled the onclick listener outside the OncreateView and reduced the LOC by pulling out the code and converting them in functions.

Will be waiting for your review.
Thanks
Reply all
Reply to author
Forward
0 new messages