Git Product home page Git Product logo

surveykit's People

Contributors

coroutinedispatcher avatar klausnie avatar kupeliorhun avatar maltebucksch avatar n8fr8 avatar nasirky avatar numoy avatar sellmair avatar yasincidem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

surveykit's Issues

Change string values of cancel dialog box

Hi, I downloaded the survey kit the last week, but I can't change the string values used in the dialog box that is displayed when the user clicks on the cancel button. Could you help me, please? Thank you in advance.

"Submit Survey" button not clickable after click one time

I finish the survey and clicked the submit survey button after that I tried to click again but button is not clickable.
All I want to do that I want to click last button many times. I couldn't find how to enable clickable last button.

Step constructors....resource INTS or STRINGS?

Hello all! This is a wonderful API and thank you for creating it.

I've downloaded (via ZIP) the current code base for SurveyKit and am working through the process of making my own survey. In the ZIPPED code, all of the Step derived classes seem to require String? objects. For example:

open class InstructionStep(
private val title: String? = null,
private val text: String? = null,
private val buttonText: String = "Start",
...
}

That is great! However when I make a new project and bring in version 1.0.0 of SurveyKit:

// Bring in the SurveyKit API
// https://github.com/quickbirdstudios/SurveyKit
implementation "com.quickbirdstudios:surveykit:0.1.0"

It appears all of the Step derived classes now want nullable Ints only? For example:

open class InstructionStep(
@StringRes private val title: Int? = null,
@StringRes private val text: Int? = null,
@StringRes private val buttonText: Int = R.string.start,
...
}

For the app I am trying to design, I need to send in String objects directly as I am reading the survey data dynamically at runtime (from an Excel file) and won't have any known resource IDs.

Is there an earlier version of SurveyKit I can pull down that still operates on String constructor parameters?

Thanks for any guidance!

Andrew

IllegalStateException when cancelling a questionnaire

Library throws the following error when trying to cancel a ongoing questionnaire.

java.lang.IllegalStateException: Already resumed
        at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:45)
        at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$2.invoke(PresenterImpl.kt:70)
        at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$2.invoke(PresenterImpl.kt:17)
        at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$setupViews$5.invoke(QuestionView.kt:103)
        at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$setupViews$5.invoke(QuestionView.kt:51)
        at com.quickbirdstudios.surveykit.backend.views.main_parts.Header$$special$$inlined$apply$lambda$1.onClick(Header.kt:70)
        at android.view.View.performClick(View.java:7259)
        at android.view.View.performClickInternal(View.java:7236)
        at android.view.View.access$3600(View.java:801)
        at android.view.View$PerformClick.run(View.java:27892)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Unable to add this as a part of our project

ERROR: Plugin [id: 'org.jetbrains.kotlin.android'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Plugin Repositories (plugin dependency must include a version number for this source)

add customizable "cancel" button

Hi!
It will be good to have customizable cancel button, because now I can't event change label, so I'm stuck with english "cancel".

Best regards!

Customize "Cancel, Next" Button and Alert "Cancel"

Hi how are things!

It would be good if they update the "Cancel, Next" buttons and the "Cancel" alert and change it from the "String" file but it remains the same and does not change the text, it would be of great help.

Cheers!

Resume survey from last question

Assume I have 15 question survey. Users have completed 10 and user Killed the app from the recent app list and relaunched the survey app again. How to start the survey from the 11th question from where the user left? can I do it with this syrveyKit?

Customization Requests

I need to customize the look (left justification of some text, button different colors, square and right justified...)

I can attempt this in a new branch and do a PR, but I don't have authentication to your repo.
I am an experienced programmer but have never contributed to an open source project.

Recommendation: Moving Strings in Cancel survey Popup to string resources file

Recommendation: Moving Strings in Cancel survey Popup to string resources file so that we can add localization

Currently resources show these values only

#000000 #80000000 #3D3D3D #3CD0DF #853CD0DF #33C5D4 #807A7A7A #F3F3F3 #807A7A7A #337A7A7A #807A7A7A #00FFFFFF #FFFFFF 4dp 40dp 12dp 20dp 20dp 20dp 16sp 0dp 28sp 8dp 28sp 16dp 20sp 32sp 4dp 12dp 24dp 6dp Tell us about yourself and why you want to improve your health. Tell us about you Penicillin Latex Pet Pollen Do you have any allergies that we should be aware of? Known allergies Cancel Finish Submit survey Thanks for taking the survey, we will contact you soon! Done! 5 1 Select your body type How old are you? Let\'s go! Get ready for a bunch of super random questions! Welcome to the\nQuickBird Studios\nHealth Survey Next No We are done, do you mind to tell us more about yourself? Done? Start Yes

json schema

It would be great to have json schema so you can validate the survey task from the backend so you don't have to find out it is not working when a user tries to load it.

Location answer

Implement location answer. See ResearchKit for reference on how it should look like.

IllegalStateException: Already resumed

Just click through the example app.
Submit Survey Button seems to do nothing on first click, the second click will lead to the following stacktrace

2019-11-27 11:31:04.037 16930-16930/com.quickbirdstudios.example E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.quickbirdstudios.example, PID: 16930
    java.lang.IllegalStateException: Already resumed
        at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:45)
        at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:62)
        at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:17)
        at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:122)
        at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:51)
        at com.quickbirdstudios.surveykit.backend.views.main_parts.Footer$$special$$inlined$apply$lambda$1.onClick(Footer.kt:64)
        at android.view.View.performClick(View.java:6669)
        at android.view.View.performClickInternal(View.java:6638)
        at android.view.View.access$3100(View.java:789)
        at android.view.View$PerformClick.run(View.java:26145)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Conditional rule does not trigger when selecting multiple answer (JSON TASK)

I have this issue with the conditional rule for a multiple type question. If i select multiple answers it proceeds to the next stepidentifier.
This is my rule
{ "type": "conditional", "triggerStepIdentifier": { "id": "15" }, "values": { "9": "16", "1": "17", "2": "17", "3": "17", "4": "17", "5": "17", "6": "17", "7": "17", "8": "17" } },

This is the steps. step 17 is a different question i did not include it here. 16 is a text input if they answered "Others" on step 15. but when selecting multiple answers on step 15 that is not "Others" it still proceeds to step 16. It should skip 16 and proceed to 17 base on the conditional rule.
{ "stepIdentifier": { "id": "15" }, "type": "question", "title": "Where did you learn about it? (Please select all that applies.)?", "answerFormat": { "type": "multiple", "textChoices": [ { "text": "Poster", "value": "1" }, { "text": "Teacher/School", "value": "2" }, { "text": "Friend/Acquaintance", "value": "3" }, { "text": "Parents/Sister/Brother/Relatives", "value": "4" }, { "text": "Official Facebook Page", "value": "5" }, { "text": "Website", "value": "6" }, { "text": "Other internet sites", "value": "7" }, { "text": "Satellite Offices", "value": "8" }, { "text": "Others, please specify", "value": "9" } ] } }, { "stepIdentifier": { "id": "16" }, "type": "question", "title": "Where did you learn about it? Please specify", "answerFormat": { "type": "text", "maxLines": 5, "validationRegEx": "^(?!\\s*\\$).+" } },

Java version

Just wondering is there a way to incorporate SurveyKit for the use of a Android Studio for Java project?

Can not create Form Step

I wanted to have a Step in which I can add multiple questions/Steps for the same screen. So that I can have mix of survey questions with single Questions in one screen as well as in a few screens/step in can show multiple questions.
How to do it?

Double click on any buttons inside the survey is crashing

Some users can double click/tap on buttons inside the survey (like Lets Go or Send survey) and its causing to crash

2020-03-17 17:07:42.381 26534-26534/com.tejimandi.beta E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tejimandi.beta, PID: 26534
java.lang.IllegalStateException: Already resumed
at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:45)
at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:62)
at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:17)
at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:122)
at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:51)
at com.quickbirdstudios.surveykit.backend.views.main_parts.Footer$$special$$inlined$apply$lambda$1.onClick(Footer.kt:64)
at android.view.View.performClick(View.java:6319)
at android.view.View$PerformClick.run(View.java:24955)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
2020-03-17 17:07:42.382 26534-26534/com.tejimandi.beta D/App: Alert Already resumed
2020-03-17 17:07:42.384 26534-26534/com.tejimandi.beta E/Utils: java.lang.IllegalStateException: Already resumed
at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:45)
at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:62)
at com.quickbirdstudios.surveykit.backend.presenter.PresenterImpl$showAndWaitForResult$$inlined$suspendCoroutine$lambda$1.invoke(PresenterImpl.kt:17)
at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:122)
at com.quickbirdstudios.surveykit.backend.views.step.QuestionView$onViewCreated$1.invoke(QuestionView.kt:51)
at com.quickbirdstudios.surveykit.backend.views.main_parts.Footer$$special$$inlined$apply$lambda$1.onClick(Footer.kt:64)
at android.view.View.performClick(View.java:6319)
at android.view.View$PerformClick.run(View.java:24955)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)

Cancel and Skip won't work

AbortDialogConfiguration is not present in the current version 1.1.0, still, the Cancel button triggers an alert where the actual cancel doesn't navigate to any page but freeze the survey.
The skip button button_skip_question in the footer does not have a text "Skip" set to it. So it just creates a button without text. Only header has a theme set in QuestionView.style().

Setup instruction is out-dated

Change the example code from

<com.quickbirdstudios.survey_kit.public_api.survey.SurveyView
    android:id="@+id/survey_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

To

<com.quickbirdstudios.surveykit.survey.SurveyView
    android:id="@+id/survey_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Otherwise a runtime error is thrown
[...] Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.quickbirdstudios.survey_kit.public_api.survey.SurveyView [...]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.