Build your own quiz app
The task is to create a quiz app that retrieves random questions from the JSON API offered from the Open Trivia Database
* When starting a new quiz, the app should download a number of new questions from the JSON API. Use Retrofit, ViewModel, LiveData and Repository as before.
* The question selection is based on category, number of questions, etc. (preferably set in the settings screen).
* The questions are presented using. ViewPager2, one question per page (using its own snippet), so the user can scroll back and forth between the questions.
* After a question set has been downloaded, it is stored locally on a file, e.g. running_quiz.json
-Storage and reading to / from this file should be done in the repository class.
-In the method that downloads new questions, it is first checked whether there is a local file with questions. In that case, the content is returned from this. If the file does not exist, a new query set is downloaded. As long as there is a local question file, it is the one that applies / is used, until the user resets or the quiz is completed.
* When a quiz is completed, the number of correct answers is presented. The result may be presented. The user can then start a new quiz.
* The app must consist of a minimum of three Activity classes. MainActivity, SettingsActivity and QuizActivity
-Correct answers can possibly. appears in a separate CorrectAnswersActivity (or otherwise).
* QuizActivity should have a “bottom menu”, BottomNavigationView, as shown in the figure. Here, there must be at least one choice to return to MainActivity (Home button / house).
* The app should have a settings screen (SettingsActivity) where the user can decide:
– number of questions,
– degree of difficulty,
– type of question (multiple choice or true / false).
– Selected values are used to build the URL used against the JSON API.
– See the following link for tips for creating a settings screen (in addition to review): https://developer.android.com/guide/topics/ui/settings
The pictures are just a suggestion for the app’s appearance