Go Back   Android Forums > Android Development > Application Development > Application Requests
Application Requests Request Apps or provide ideas for the devs here.

test: Reply
LinkBack Thread Tools
Old January 14th, 2013, 10:50 PM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Jan 2013
Posts: 1
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Best way to code a Quiz Application

Hi I'm new to these forums and sort of new to android development. I want to create a quiz application with a main screen, and a quiz screen with 3 controls

I took a java intro course, and studied android myself. This is my second year into computer science at the U of Mn

Main screen =
1. new quiz
2. high scores
3. contact/misc info

New quiz -> quiz screens that starts with questions.
1. choose multiple choice questions with 5 choices. If choose correct display green button, otherwise, display red button
2. can keep picking answers it until you figure out the right answer
3. next question
4. return to menu(may be unnecessary because of back button?)

Here is a picture of my idea
|****what is 1 + 1
|a. 1
|b. 2
|c. 3
|d. 4
|e. 5

you can picking answers until it tells you when you get it right. (its a learning application)

and it would choose 24 questions arbitrarily from a pool of lets say 100. After the last question [next] would give you your score out of 24, then let you go back to main menu.

Whats a good way to think about designing this in terms of activities, intents, and the xml layouts that come with. I understand how very simple android programs work, but since there is a going to be a multitude of choices, would i need seperate activities for each correct/incorrect answer choice?

If someone can draw me a diagram of the like the first 4 questions, and how they transition into each activity that would be awesome!!!!

thanks in advance and please any help would be greatly appreciated.

_faith_ is offline  
Reply With Quote
sponsored links
Old January 15th, 2013, 09:20 AM   #2 (permalink)
The Real Bass Creator
Digital Controller's Avatar
Join Date: Sep 2012
Location: Cincinnati, Ohio
Gender: Male
Posts: 12,497
Device(s): Galaxy Note 3 4.4.2(Eclipse) , Nexus 7 (Stock), (RIP) Galaxy Nexus 4.4(SlimKat)
Carrier: Verizon

Thanks: 748
Thanked 3,423 Times in 2,163 Posts

I have moved this thread into Application Requests as it sounds like you are kind of requesting someone to assist you with this app.

Hope this helps
Want Faster help? Read this before posting!

I love this community and so should you! So before posting please read:
Site Rules & Guidelines and Android FAQ's
Digital Controller is offline  
Reply With Quote
Old January 16th, 2013, 04:29 PM   #3 (permalink)
Junior Member
Join Date: Sep 2011
Location: AZ
Gender: Male
Posts: 71
Device(s): Droid 1, Xoom WIFI, HTC Thunderbolt, Galaxy S3, Kindle Fire
Carrier: Big Red

Thanks: 0
Thanked 6 Times in 6 Posts

you'll want a few different activities:

main - menu and buttons/links to about, help, etc..

quiz - shows a given question of a set quiz. can be setup to have room for the question and then a ListView of answers. when a user clicks on an answer it is validated, a toast ( or other popup ) appears and shows them if they are right or wrong, and the next question pops up.

contact/info - is this for you or for them?

Some supporting features would be:
a way to add new questions to the set ( server, xml file, etc.. )
group the questions ( easy math, algebra, definitions, etc. )
dlhavema is offline  
Reply With Quote
Old January 18th, 2013, 04:39 PM   #4 (permalink)
Junior Member
Join Date: Sep 2011
Posts: 15
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts

You will also need a database system at the background to make your work easier!
rexes is offline  
Reply With Quote
Old January 18th, 2013, 04:49 PM   #5 (permalink)
Junior Member
prl91's Avatar
Join Date: Jun 2011
Posts: 43
Carrier: Not Provided

Thanks: 4
Thanked 25 Times in 15 Posts
Default Re: Best way to code a Quiz Application

You should only need one activity. I would recommend just creating a different XML layout for static pages such as your help page and contact page, and then switching to those by calling them with a onclick receiver. You shouldn't need any global or local broadcast receivers or intents either, except for the onclick. That will just slow your app down. Not by a lot, but coding for performance early on will help you get into the mind set for future development, where it may be more important.
prl91 is offline  
Reply With Quote
Old January 19th, 2013, 12:10 AM   #6 (permalink)
Join Date: Apr 2010
Posts: 427
Carrier: Not Provided

Thanks: 6
Thanked 34 Times in 32 Posts

Generally there are two kind of UI. Developers more familiar with HTML5,Javascript etc will go for webview and phonegap to access android specific like notification,camera etc. Others do the native traditional way.

As for database, it depends, some apps need to interface with server so database will reside in server instead of the local app database. However for performance, some data maybe cached in local app database when say internet connectivity is not available. Once available sync the local app data to the server.
sohguanh is offline  
Reply With Quote
Old February 22nd, 2013, 04:46 PM   #7 (permalink)
Junior Member
Join Date: Feb 2011
Location: Orange County
Gender: Male
Posts: 91
Device(s): Google/Asus Nexus 7
Carrier: Not Provided

Thanks: 7
Thanked 0 Times in 0 Posts

You'll need to be able to save the number of answers right and wrong, and number of questions in a database or localStorage if you want to give them back later.

You can make the answers as easily as a simple alert popup, so they are coded right into an HTML page (using PhoneGap, for instance).
StevenHu is offline  
Reply With Quote

Go Back   Android Forums > Android Development > Application Development > Application Requests
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 08:11 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.