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

Litle Update your code #12

Open
kenmeidearu opened this issue Aug 24, 2017 · 0 comments
Open

Litle Update your code #12

kenmeidearu opened this issue Aug 24, 2017 · 0 comments

Comments

@kenmeidearu
Copy link

hi Andre,
many thanks for your library for suvey

i was modified your code to get more better survey and can save to databse..
this output for my modified
"survey_properties": {
"intro_message": "Your feedback helps us to build a better mobile product.


Hello, Feedback from our clients, friends and family is how we make key decisions on what the future holds for XYZ App.

By combining data and previous feedback we have introduced many new features e.g. x, y, z.

It will take less than 2 minutes to answer the feedback quiz.",
"end_message": "Thank you for having the time to take our survey.",
"skip_intro": false
},
"questions": [
{
"question_type": "Checkboxes",
"question_id": 3,
"question_title": "Do you currently use one of these other software solutions?",
"description": "",
"required": false,
"random_choices": true,
"choices": [
{
"idChoice": 1,
"valueChoice": "Yes, I use a red product"
},
{
"idChoice": 2,
"valueChoice": "I use a green product"
},
{
"idChoice": 3,
"valueChoice": "I partialy use a blue product"
}
]
},

{
  "question_type": "String",
  "question_id": 4,
  "question_title": "Why did you not subscribe at the end of your free trial ?",
  "description": "",
  "required": false
},
{
  "question_type": "Radioboxes",
  "question_id": 2,
  "question_title": "What is your age group ?",
  "description": "",
  "required": true,
  "random_choices": false,
  "choices": [
    {
      "idChoice": 1,
      "valueChoice": "less than 20"
    },
    {
      "idChoice": 2,
      "valueChoice": "20-30"
    },
    {
      "idChoice": 3,
      "valueChoice": "30-40"
    },
    {
      "idChoice": 4,
      "valueChoice": "40-50"
    },
    {
      "idChoice": 5,
      "valueChoice": "50+"
    }
  ]
},
{
  "question_type": "Checkboxes",
  "question_id": 1,
  "question_title": "What were you hoping the XYZ mobile app would do?",
  "description": "(Select all that apply)",
  "required": false,
  "random_choices": false,
  "choices": [
    {
      "idChoice": 1,
      "valueChoice": "thing #1"
    },
    {
      "idChoice": 2,
      "valueChoice": "thing #2"
    },
    {
      "idChoice": 3,
      "valueChoice": "thing #3"
    },
    {
      "idChoice": 4,
      "valueChoice": "thing #4"
    }
  ]
},
{
  "question_type": "Radioboxes",
  "question_id": 2,
  "question_title": "What is your age group ?",
  "description": "",
  "required": true,
  "random_choices": false,
  "choices": [
    {
      "idChoice": 1,
      "valueChoice": "less than 20"
    },
    {
      "idChoice": 2,
      "valueChoice": "20-30"
    },
    {
      "idChoice": 3,
      "valueChoice": "30-40"
    },
    {
      "idChoice": 4,
      "valueChoice": "40-50"
    },
    {
      "idChoice": 5,
      "valueChoice": "50+"
    }
  ]
},

{
  "question_title": "If this app was paid, how much you would give to have it ?",
  "question_id": 5,
  "description": "",
  "required": false,
  "question_type": "Number"
},
{
  "question_id": 6,
  "question_title": "berapa istri yang sudah kamu miliki ?",
  "description": "jelaskan dengan detail ",
  "required": true,
  "question_type": "Number"
},
{
  "question_id": 7,
  "question_type": "StringMultiline",
  "question_title": "We love feedback and if there is anything else you’d like us to improve please let us know.",
  "description": "",
  "required": false,
  "number_of_lines": 4
}

]

****************** WE HAVE ANSWERS ******************
androidadvance.com.androidsurveyexample E/ANSWERS JSON: [{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"I use a \u003cfont color\u003d\u0027#00AA00\u0027\u003egreen product\u003c/font\u003e"},{"idChoice":"1","selected":true,"valueChoice":"\u003cfont color\u003d\u0027#AA0000\u0027\u003eYes, I use a \u003cstrong\u003ered\u003c/strong\u003e product\u003c/font\u003e"}],"Ask":"Do you currently use one of these other software solutions?","idAsk":"3"},{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"I use a \u003cfont color\u003d\u0027#00AA00\u0027\u003egreen product\u003c/font\u003e"},{"idChoice":"1","selected":true,"valueChoice":"\u003cfont color\u003d\u0027#AA0000\u0027\u003eYes, I use a \u003cstrong\u003ered\u003c/strong\u003e product\u003c/font\u003e"}],"Ask":"Do you currently use one of these other software solutions?","idAsk":"3"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"Qw"}],"Ask":"Why did you not subscribe at the end of your free trial ?","idAsk":"4"},{"Answer":[{"idChoice":"1","selected":false,"valueChoice":"less than 20"}],"Ask":"What is your age group ?","idAsk":"2"},{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"thing #2"}],"Ask":"What were you hoping the XYZ mobile app would do?","idAsk":"1"},{"Answer":[{"idChoice":"3","selected":false,"valueChoice":"30-40"}],"Ask":"What is your age group ?","idAsk":"2"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"4"}],"Ask":"If this app was paid, how much you would give to have it ?","idAsk":"5"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"1"}],"Ask":"berapa istri yang sudah kamu miliki ?","idAsk":"6"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"qwerty\ndggg"}],"Ask":"We love feedback and if there is anything else you’d like us to improve please let us know.","idAsk":"7"}]
androidadvance.com.androidsurveyexample E/****: *****************************************************
so i can get the id of question and answer from output json.
can you add fragment for take a picture.. or if you bussy i will create my self

your save my time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant