quickbirdeng / surveykit Goto Github PK
View Code? Open in Web Editor NEWAndroid library to create beautiful surveys (aligned with ResearchKit on iOS)
License: MIT License
Android library to create beautiful surveys (aligned with ResearchKit on iOS)
License: MIT License
Investigate why Coroutines are needed when the library is used in a project and remove that issue
I have custom array along with ids I want to get the ids of all YES and NO click
not the default ids generated by the library like id=b3aa729d-7345-491d-981a-66a2b7ee3c45
what I want suppose the user click 3rd position to NO I want index of that position not id=b3aa729d-7345-491d-981a-66a2b7ee3c45 like this
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.
It would be easier to make the github actions release the version of SK automatically. Thus we would need to work on this.
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.
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
The theme and text colour doesn't change even after changing the colours in configuration file.
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)
ERROR: Plugin [id: 'org.jetbrains.kotlin.android'] was not found in any of the following sources:
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!
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!
When I add first/last CustomStep type question the app crashes, there is no crash log showing. I have double-checked with your provided example
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?
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.
should be
com.quickbirdstudios:survey:1.1.0
instead of
com.quickbirdstudios:surveykit:1.1.0
Both have the option for a default selection missing.
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 YesI am trying to implement this library in a compose only navigation with one activity, how can I achieve this?
currently the CI stuff is running on an old, useless mac mini. Move all that onto the new CI server.
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.
Can i just pass default text color for the config?
I implemented date selection but can't scroll the year selection in date selector
I forgot that in the last PR. The decimal answer needs an integration test
I am trying to set a string dynamically fetched from an API to the question but QuestionStep
only allows StringRes
. Any solution for that?
Implement location answer. See ResearchKit for reference on how it should look like.
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)
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*\\$).+" } },
I try to flick clock dial on Time Picker but I am unable to do so
Just wondering is there a way to incorporate SurveyKit for the use of a Android Studio for Java project?
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?
Since we now have a CI set up, the PR would be more structured. However developers need to know the steps to make the CI build pass.
An update is needed in the README.md file providing that information
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)
Add the option to pass in drawables (not just resource Ids).
This will be a breaking change.
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().
One solution: add the generic type of the answer to the StepIdentifier
.
Is there a way to change the background to a dark color and the foreground/text to a light color?
Implement AnswerFormat.ImageChoiceAnswerFormat
see (http://researchkit.org/docs/docs/Survey/CreatingSurveys.html)
If for example the first Page is not the IntroductionPage rather a QuestionPage the back button (arrow-icon) should not be visible.
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 [...]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.