Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get form response as JSON and Send response to Custom Server #5

Open
chinmoy12c opened this issue Feb 23, 2023 · 2 comments
Open

Get form response as JSON and Send response to Custom Server #5

chinmoy12c opened this issue Feb 23, 2023 · 2 comments
Assignees
Labels
CGCP phase-2 Phase-2 of ODK feature upgrade

Comments

@chinmoy12c
Copy link
Member

chinmoy12c commented Feb 23, 2023

Add JSON format option for form submissions in ODK Collect Extension and Send the response to custom server

Project Details

Add JSON format option for form submissions in ODK Collect Extension and Send response to custom server

Duration

6 Weeks

Complexity

High

Skills Required

Java, Kotlin, Android Development

Mentor

@charanpreet-samagra

Project Size

Medium

Description

ODK Collect is an open-source Android app used for survey-based data gathering, replacing traditional paper forms. It offers various question and answer types and is designed to function offline. ODK Collect Extension is a set of tools built on top of ODK Collect that allows developers to integrate ODK Collect into their own Android applications, customizing its functionality to meet their specific needs.

Currently, when a form is submitted in the ODK Collect extension, it is only sent in XML format to the ODK Aggregate or central server. The goal of this project is to enhance the library by adding the ability to generate form submissions in JSON format as well. This will provide greater flexibility to users, allowing the main module to decide how to handle the output.

Additionally, the project aims to enable the ODK Collect Extension to send form responses to a custom server instead of ODK Aggregate. This will be achieved by introducing a configuration option in the settings.json file, allowing users to specify the custom server endpoint. The submission to the custom server should be performed via a configurable POST request, and the settings.json file should support authentication using an auth token for communication with the custom server.

Milestones

  1. Understanding the existing ODK Collect Extension functionality
  2. Familiarizing with the codebase and architecture
  3. Adding JSON format option for form submissions
  4. Implementing configurable custom server submission in settings.json
  5. Testing and validating the JSON format and custom server submission
  6. Updating the documentation to reflect the new functionality

Acceptance Criteria

  • The ODK Collect Extension library is updated to support form submissions in JSON format.
  • The existing option to submit in XML format to the ODK server continues to work parallelly and can be controlled via a settings key in settings.json.
  • The JSON format option for form submissions is fully functional and tested for accuracy and reliability.
  • The settings.json file includes a configuration option for specifying a custom server endpoint for form submissions.
  • Form submissions to the custom server are performed using a configurable POST request, with support for authentication using an auth token.
  • The code should be validated by creating proper unit tests.
  • The documentation is updated to provide clear instructions on how to utilize the JSON format option and configure the custom server submission.

Stretch Goals

  • Implementation of additional formats like CSV.

Additional Information

This issue is nominated for the Code for GovTech (C4GT) 2023 edition, which aims to create a community of developers contributing to global Digital Public Goods. More information about C4GT can be found at https://codeforgovtech.in/.

@chinmoy12c chinmoy12c self-assigned this Feb 23, 2023
@karntrehan karntrehan transferred this issue from another repository Mar 9, 2023
@chinmoy12c chinmoy12c added the phase-2 Phase-2 of ODK feature upgrade label Mar 13, 2023
@chinmoy12c chinmoy12c changed the title Get form response as JSON Get form response as JSON and Send response to Custom Server May 15, 2023
@MasterBlaster99
Copy link

MasterBlaster99 commented May 25, 2023

@chinmoy12c is this issue fixed ? if so, why is this still open ?

@Himasnhu-AT
Copy link

Hi, I would like to contribute to this. May I know how can I get started? By the way, I'm also submitting it on C4GT. But I would love to contribute anyway.

Skills I Have: Android Development using Android Studio with Java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CGCP phase-2 Phase-2 of ODK feature upgrade
Projects
None yet
Development

No branches or pull requests

4 participants