0 item(s)

You have no items in your shopping cart.

Product was successfully added to your shopping cart.
Trivia Quiz App for Android

Trivia Quiz App for Android

From: $18.99

To: $89.99

Trivia Quiz App for Android

Trivia Quiz App for Android

* Required Fields

Price: $0.00

Availability: Out of stock

From: $18.99

To: $89.99

Price: $0.00

‘Quiz App’ is a native Android template app for quality trivia. This project is easy to use and configure over property list (XML), so there is no need that you know programming. You can define as many quiz topics as you like, each quiz have unlimited number of questions, for each question there are 4 possible answers and between them you have to define correct answer. When user select quiz, gameplay screen appears and user have to pick correct answer in 5 seconds. Time is represented visually as 5 lines that will turn to gray when each second pass and they'll change color from green to red depending how much seconds is left. Game also support configurable score system. Application has categories of different quizzes which feature questions from each quiz. This module has three packages with their set of classes. **Main** package has all activities while **utility** classes have a separate package. Then there is package for **Twitter** classes.
Quizzes class holds different categories of quizzes. Each category has questions specific to each quiz. List of categories are shown through listview control and populated with its adapter. listOfQuizzes = PListHelper.parseQuizzesPlist(PListHelper.readQuizzesListFromAssets(getApplicationContext())); if(listOfQuizzes != null) listView.setAdapter(new QuizzesListAdapter(Quizzes.this, listOfQuizzes)); Selection of any category results in start of game implemented by class PlayGame. public void onItemClick(AdapterView> adapterView, View view, int position, long id) { if(listOfQuizzes != null){ Intent aQuizIntent = new Intent(Quizzes.this, PlayGame.class); Utils.quiz = listOfQuizzes.get(position); startActivity(aQuizIntent); } } Each quiz-item view in listview is generated by returning getView against each item. public View getView(int position, View convertView, ViewGroup parent) { Log.i("QuizzesPage", "QuizzesListAdapter: getView"); View view = null; if(convertView == null){ view = LayoutInflater.from(context).inflate(R.layout.row, null); final ViewHolder viewHolder = new ViewHolder(); viewHolder.name = (TextView)view.findViewById(R.id.rTitle); viewHolder.description = (TextView)view.findViewById(R.id.rDescription); viewHolder.imageName = (ImageView)view.findViewById(R.id.rImage); view.setTag(viewHolder); }else{ view = convertView; } ViewHolder holder = (ViewHolder)view.getTag(); holder.name.setText(_listOfQuizzes.get(position).getName()); holder.description.setText(_listOfQuizzes.get(position).getDescription()); //menu item image String imageName = _listOfQuizzes.get(position).getImageName(); if(imageName != null){ AssetManager assetManager = getAssets(); try { InputStream inputStream = assetManager.open("images/"+imageName); holder.imageName.setImageBitmap(BitmapFactory.decodeStream(inputStream)); } catch (IOException e) { e.printStackTrace(); } } return view; }
PlayGame class covers the main logic of the game. Each quiz question is selected randomly and displayed by GenerateQuestionNumber and PopulateQuestion functions respectively. //Generate Random Game Question Number private int GenerateQuestionNumber(){ Random rand = new Random(); int temp = -1; boolean test; do{ temp = rand.nextInt(totalQuestions); test = myListOfTriviaQuestions.get(temp).GetIsThisQuestionAsked(); if(!test){ myListOfTriviaQuestions.get(temp).SetIsThisQuestionAsked(true); questionsAsked+=1; sequenceOfQuestionsAsked[indexOfsequenceOfQuestionsAsked++]=temp; break; } }while(test && questionsAsked
SecondCountDownRunner is a custom runnable class to send timer message after each second to update game state. private class SecondCountDownRunner implements Runnable{ private boolean doRun = true; public void run() { //Log.i("sec..","inside:"+doRun); while( doRun && !Thread.currentThread().isInterrupted()){ Message m = new Message(); m.what = PlayGame.SECONDPASSEDIDENTIFIER; //unique message code PlayGame.this.myTimerViewUpdateHandler.sendMessage(m); try { Thread.sleep(1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } //To stop timer public void stopThread(){ doRun=false; } //To resume timer public void resumeThread(){ doRun=true; } public void startThread(){ doRun=true; } } myTimerViewUpdateHandler class does handle message from above runnable to perform desired state change of the game. Handler myTimerViewUpdateHandler = new Handler(){ @Override public void handleMessage(Message msg) { switch(msg.what){ case PlayGame.SECONDPASSEDIDENTIFIER: if(mySecondsPassed > 0) mySecondsPassed -= 1; else { mySecondsPassed = config.GetTimeToAnswer(); incorrect+=1; if(questionsAsked >= totalQuestions){ //true when all questions asked isGameEnded=true; EndGame(); DisplayResults(); } else { currentQuestionNumber=GenerateQuestionNumber(); PopulateQuestion(); } } UpdateTimerColors(mySecondsPassed); } super.handleMessage(msg); } };
Result class simply displays results the statistics received from PlayGame class. Intent resultReview = getIntent(); totalPoints = resultReview.getExtras().getInt("Points"); title = resultReview.getStringExtra("Title"); txtTitle.setText(title); prefs = PreferenceManager.getDefaultSharedPreferences(this); highScore = prefs.getInt(title + "HS", -1); if(highScore == -1){ SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putInt(title + "HS", totalPoints); prefsEditor.commit(); txtHighScore.setText(""); txtYourScore.setText("With " + totalPoints + " points you have set an new High score!"); }else{ if(highScore > totalPoints){ txtHighScore.setText("Highscore: " + highScore); txtYourScore.setText("You have scored " + totalPoints + " points."); }else{ SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putInt(title + "HS", totalPoints); prefsEditor.commit(); txtHighScore.setText(""); txtYourScore.setText("With " + totalPoints + " points you have set an new High score!"); } }
Project includes quizzeslist.plist file that stores data about annotations. Each item defines one quiz in collection of quizzes. Each quiz has a name, description, imageName and list of questions with their answers. Questions has array of child items. Each item has a question, array of options and an answer. These are the annotations taken from plist file: • Name – of quiz • Description – about quiz • ImageName – of the quiz logo • Questions – in a quiz. • Question – in a quiz. • Options – in a question • Answer – of a question NameHistoryDescriptionCheck your knowledge about great historical events, who did what where to whom!ImageNamehistory_icon.pngQuestionWhich book is NOT part of the Standard Works?OptionsThe Book of MormonLectures on FaithBibleDoctrine and CovenantsAnswer2QuestionWho is NOT a member of the God-head?OptionsJoseph SmithJesus ChristThe Holy GhostHeavenly FatherAnswer1QuestionThe First Vision took place in which year?Options1820183018001776Answer1

No comments available at the moment. Please try later.

0 Comments

Please login in order to leave a comment.

    Save time and money by using professional, ready-to-use App and Game Templates. The goal here is to reduce the time and cost of making a Game App, by replacing custom development with ready to use App Templates. Customers can purchase items 24-7 from anywhere and get instant deliveries.

    By purchasing a template on Chupamobile you will get:

    • Full App Template Source Code
    • License of use
    • Lifetime free Updates of the Template
    • Support by the Original Author of the App Template
    • Being part of the largest professional community of App Developers and Publishers.

    The difference between single and multiple licenses is the number of projects you can use the template within:

    • Single License: The single license allows you to use the app template on one project, either for your own profit or on behalf of a client. You can publish on the app stores one single app based on this template;
    • Multiple License: The multiple license allows you to use the template on an unlimited number of projects, either for you or for a client. You can use it as many times as you want.

    Simply by purchasing the App/Game Template and customizing the UI and/or adding new features. You can customize it by yourself if you have the necessary skills or you can easily choose to launch your App with our Premium Template Customization Service

    The App Reskin Service is the quickest, most affordable and safest option to bring your app or game concept to life if you do not have any coding skills and/or time to do it yourself.

    The Service includes the following:

    1. A professional and dedicated project manager throughout the whole Reskin Service
    2. Design proposals - based on your brief (including: Full theme, Icons, Screenshots, Characters, Splash Screen + other features you may have)
    3. Design integration and optimization for the different device sizes.
    4. Basic ASO (App Store Optimization) to help users find your app in the Stores.
    5. The best performing ad network(s) fully integrated in your app for monetization purposes
    6. Complete submission on the app store(s)
    7. After sales support

    Every app template purchased on Chupamobile Marketplace will be completely customized before launch for it to have a unique UX (user experience) for the final user.

    The assigned team of app developers will integrate the best monetization tools on the market to enable your app to start monetizing in the most effective and efficient manner as soon as it is published on the app store(s).

    Chupamobile manages the project for you together with a professional team of app developers and designers selected from our community of more than 100.000 specialists.The dedicated project manager will manage the app project from A-Z, as well as securing your payment on an escrow account, until completion of the project. In addition, Chupamobile offers after-sales support once your app is submitted on the app store(s) for an extra-hassle free experience!

    If you need a custom quotation, Contact Us.

    We stand behind everything we sell.

    One of the greatest thing on purchasing an App Template on Chupamobile is our 14 Days Money Back Guarantee Policy.

    A refund can be requested only:

    1. Within 14 days after the original purchase date;
    2. If the product purchased does not work as advertised in the product description;
    3. After having detailed the issues experienced to the original author of the product by posting a comment on the product page;
    4. After 48 hours of posting your comment and you haven’t received support from the original author of the product.
    5. Our team will review each refund request manually, in order to protect both the Customer rights and the Intellectual Property of the Seller.

    14 Days
    Money back guarantee

    Categories:

    App Templates

    Platform:

    Framework:

    Eclipse

    Files included:

    .dex, .dat, .apk

    Video :

    View Video
    X