{"id":17246545,"url":"https://github.com/andreid/surveylib","last_synced_at":"2025-04-07T07:18:26.630Z","repository":{"id":57716854,"uuid":"45798812","full_name":"AndreiD/surveylib","owner":"AndreiD","description":"The Best Looking Survey Library for Android","archived":false,"fork":false,"pushed_at":"2023-01-24T14:42:51.000Z","size":5793,"stargazers_count":221,"open_issues_count":13,"forks_count":127,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-31T06:06:00.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-08T20:58:44.000Z","updated_at":"2024-12-09T17:02:11.000Z","dependencies_parsed_at":"2023-02-13T22:30:53.499Z","dependency_job_id":null,"html_url":"https://github.com/AndreiD/surveylib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2Fsurveylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2Fsurveylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2Fsurveylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2Fsurveylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiD","download_url":"https://codeload.github.com/AndreiD/surveylib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608160,"owners_count":20965953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T06:34:22.128Z","updated_at":"2025-04-07T07:18:26.610Z","avatar_url":"https://github.com/AndreiD.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android Survey\n==========================\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android%20Survey-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2780)\n\n## Sadly, I don't have time to maintain this. If you'd like to be a maintainer, drop me a message in an issue !\n\nSpecial thanks to https://github.com/howettl for his contribution.\n\n## A simple to use, survey library for collecting feedback from your users.\n\n\n![alt text](https://github.com/AndreiD/surveylib/raw/master/app/surveygif.gif \"Android Survey Gif\")\n\n\n### Instalation:\n\n~~~~\ncompile 'com.androidadvance.surveylib:surveylib:0.0.1'\n~~~~\n\n\n### How to use it:\n\n1. Take a look at the [example project](https://github.com/AndreiD/surveylib/blob/master/app/src/main/java/androidadvance/com/androidsurveyexample/MainActivity.java)\n\n\n##### Step 1:\n\nYou will need:\nA json file with the questions. Check the [assets folder](https://github.com/AndreiD/surveylib/tree/master/app/src/main/assets) to see 3 examples.\n\n\n##### Step 2:\n\nCall the class **SurveyActivity** and pass as an extra the json string.\n~~~~\n        private static final int SURVEY_REQUEST = 1337;\n        a_button.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i_survey = new Intent(MainActivity.this, SurveyActivity.class);\n                i_survey.putExtra(\"json_survey\", loadSurveyJson(\"example_survey_1.json\"));\n                startActivityForResult(i_survey, SURVEY_REQUEST);\n            }\n        });\n~~~~\n\n\n\nWhat is loadSurveyJson ? check [this function.](https://github.com/AndreiD/surveylib/blob/master/app/src/main/java/androidadvance/com/androidsurveyexample/MainActivity.java#L77)\n\n\n##### Step 3:\n\nThe activity is started with a request code. \n\n~~~~\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        if (requestCode == SURVEY_REQUEST) {\n            if (resultCode == RESULT_OK) {\n\n                String answers_json = data.getExtras().getString(\"answers\");\n                Log.d(\"****\", \"****************** WE HAVE ANSWERS ******************\");\n                Log.v(\"ANSWERS JSON\", answers_json);\n                Log.d(\"****\", \"*****************************************************\");\n\n                //do whatever you want with them...\n            }\n        }\n    }\n~~~~\n\n##### Last step:\n\nAdd this activity to your manifest file.\n~~~~\n\u003cactivity android:name=\"com.androidadvance.androidsurvey.SurveyActivity\"\n            android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize\"\n            android:windowSoftInputMode=\"stateHidden\"/\u003e\n~~~~\n\n##### The Json format of the Questions.\n\nYou have couple of question types: String, StringMultiline, Number, Radioboxes, Checkboxes. They can be \"required\" or not, the choices can be random. Check the examples, everything is simple to use.\n\n\n##### Customizations\n\n###### Colors\nUse html codes in your json question title, choices. You can see a [compiled list here](http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html)\n\nDefine your material design colors in the style. \n\nNot enough ? You have to do it yourself. Simplest way is to [Fork this project](https://github.com/AndreiD/surveylib#fork-destination-box) and style, add, modify who you like.\n\n###### More question types / Other Stuff\n\nFork this project\n\n#### Troubleshooting \n\n1. Make sure you have the ***latest*** shit. At this moment: compileSdkVersion 23, targetSdkVersion 23, buildToolsVersion \"23.0.1\", compile 'com.android.support:appcompat-v7:23.1.0',   compile 'com.android.support:design:23.1.0' etc.\n2. Feed a valid json! Otherwise you'll get errors.\n3. Check the sample project.\n\n#### Updates, Questions, and Requests\n\nPing me here :)\n\n\n#### TODO://\n\n* Offline mode storage.\n* Sync with server example.\n* Adding a sliding bar / stars question type\n* Waiting for your suggestions\n\n\n#### You like this library ? Check my other projects.\n\n- https://github.com/AndreiD/UltimateAndroidAppTemplate\n- https://github.com/AndreiD/TSnackBar\n\n### If you use this library, please star this project.\n\n\n#### License\n\n~~~~\nCopyright 2015 AndroidAdvance.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n~~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreid%2Fsurveylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreid%2Fsurveylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreid%2Fsurveylib/lists"}