Cross Platform Developer Assignment

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Polaris Technical Test for

Mobile Engineer
Programming Assignment
At Polaris Smart Metering, we push our engineers and design team to
build beautiful and highly intuitive user interfaces for our consumers and
at the same time our team is expected to build software that scales. We
handle gigabytes of data on a daily basis and visualising, analysing and
managing this data is a core requirement of our technology. This
assignment will test your design skills, code quality, and understanding
of front end and site deployment technologies. While you design and
implement your solution, we expect you to think carefully about how
your software will behave when it is used at scale.

Objective :
The main objective is to design a component / Screen to display
dynamic form with field(s) created dynamically in real time based on the
JSON received through an API call.
Server

ch
o fet
ll t rom
I Ca ON f
AP ) JS
ak e
ld(
s Edit Text Field
1.M m fie
for ver Drop Down
ser

Check Boxes

Radio Group
2.Create Form with Dynamic
Field received in API
Capture
Images

Mobile Screen Mobile Screen

Understanding JSON Response :

{
"form_name": "Consumer Survey Form",
"fields": [
{
"component_type": "EditText",
"meta_info": {
"label": "Consumer Number",
"component_input_type": "INTEGER",
"input_mandatory": "yes"
},
}
]

}
1.JSON response will consist of 2 keys primarily : -

- “form_name” : Main Name of the component


form to be displayed on top of the screen.
- “fields” : JSON Array List of all the fields to be
displayed in the form.

2.”fields” will primarily consist of JSON Object with 2 keys :-

- “component_type” : Mainly define the type of


components to be created in the form fields.Major type
of components type this form can support are
- EditText
- CheckBoxes
- DropDown
- CaptureImages(Using Camera)
- RadioGroup
-
- “meta_info” : Define information related to each
component designing in JSON Object
- Example : EditText will consist of following
meta_info :
- “label” : defines EditText component
heading
- “component_input_type” : defines input
type allowed. <INTEGER,TEXT>
- “mandatory” : defines whether user input
for this field is required or not.
<”yes”,”no”>
-
- Example : CheckBoxes will consist of following
meta_info :
- “label” : defines CheckBoxes component
heading
- “options” : defines options list for
CheckBoxes components
- “mandatory” : defines whether user input
for this field is required or not.<”yes”,”no”>
-
- Example : RadioGroup will consist of following
meta_info :
- “label” : defines RadioGroup component
heading
- “options” : defines options list for
RadioGroup components
- “mandatory” : defines whether user input
for this field is required or not.<”yes”,”no”>
-
- Example : DropDown will consist of following
meta_info :
- “label” : defines DropDown component
heading
- “options” : defines options list for
DropDown components
- “mandatory” : defines whether user input
for this field is required or not.<”yes”,”no”>
-
- Example : CaptureImages will consist of
following meta_info :
- “label” : defines Capture Images
component heading
- “no_images_to_capture” : defines
number of images to be captured.
- “saving_folder” : defines folder name to
save images.
- “mandatory” : defines whether user input
for this component is required or
not.<”yes”,”no”>

Points to Remember :

1.”fields” JSON array can be of any size with


“component_type” getting repeated multiple times.

2.Order sequence of the components in the form should be


according to the sequence in the JSON Array.
Development Expectation :

1.Candidate is expected to design components for dynamic form.


API to Fetch Dynamic Form JSON Data :
https://chatbot-api.grampower.com/flutter-assignment

2.Candidate should design components taking into consideration


all the mentioned meta_info related to specific components.

3.Application should work in offline mode such that even if internet


is not available application should collect data and store in local
database in JSON Format with key name same as component
label mentioned in component meta_info.

4.Application should capture and save images if form has


component CaptureImages into folder mentioned in meta_info of
component.

5.Application should run background task and periodically check


internet connectivity, whenever internet connectivity is available
push data on cloud using API :

API : https://chatbot-api.grampower.com/flutter-assignment/push
Method Type : POST
Request Body :
{
“data” : [
{Form Response Dictionary 1 },
{Form Response Dictionary 2 }
]
}

6. Application should run background task and periodically check


internet connectivity, whenever internet connectivity is available
push images with following credentials
Bucket name : assignments-list
AWS Region : Asia Pacific (Mumbai) ap-south-1
Access key ID : AKIARUYJYFCSRJUWGKQY
Secret access key :
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

7.Candidate must create Documentation of the application.

8.Candidate has complete freedom to apply his/her creativity while


designing the UI of the screen.

9.Candidate is expected to apply architecture patterns in designing


application Example : MVC/MVVM/MVP .

You might also like