Interactive quizzes are a great way to educate, inform, or entertain. Quizzes can be configured
in countless ways using the advanced properties in the control panel. Most quizzes use simple text
to display the question. However, you may choose to use images instead. Using images as questions
can be fun and useful in many situations. If you configure the question text and use an image, the text
will appear on top of the image. If you're using images for questions, it's generally best to include
the images in the project itself and not use image URL's. If you do want to pull the images from URL's,
be careful not to use image URL's that take a long time to download, users don't like this! If you're
using images URL's, be sure they are optimized to download quickly (small file size).
IMPORTANT: This plugin is not designed to run in landscape mode. Portrait mode is the only orientation
support. FOR ANDROID YOU MUST MAKE A CHANGE TO YOUR MANIFEST FILE after downloading the project.
Open AndroidManifest.xml and look for this:
<activity android:name=".BT_screen_quiz" android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation"></activity>
Add android:screenOrientation="portrait"to the BT_screen_quiz activity so it looks like this...
<activity android:name=".BT_screen_quiz" android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" android:screenOrientation="portrait"></activity>
That will prevent the screen from rotating when the quiz is showing.
iOS Project
------------------------
3 Objective-C classes, 14 images, and 1 sound effect file are included in the plugin folder.
BT_screen_quiz.m and .h handle all the logic.
BT_photo.m and .h is used if the quiz questions use images.
BT_imageDecompress.m and .h are used by BT_photo
BT_screen_quiz.m is a UIViewController with many methods used to control the quizzes behavior.
Android Project
------------------------
1 Jaav class, 1 xml layout file, 14 images, and 1 sound effect file are included in the plugin folder.
BT_screen_quiz.java
screen_quiz.xml
screen_quiz.java is an Android Activity with many methods used to control the quizzes behavior.
The BT_screen_quiz.xml file handles the screens layout.
Version History
-----------------
v1.10 2/3/2014 Bug fix on iOS where .h file was not updated, causing an error related to the "ver" property.
v1.9 2/1/2014 Bug fixes on iOS: Fixed crashing issue on iOS 6 or lower. Fixed issues related to timer and color settings./Chris1
v1.8 1/15/2014 Bug fixes: control panel wasn't saving URL's from picker screen; iOS wasn't displaying images or toolbar./Chris1
v1.7 1/10/2014 Bug fix on control panel where answers weren't being saved properly. /Chris1
v1.6 12/10/2013 Change to control panel files for Buzztouch 3.0; Misc bug fixes. Added wobble support to iOS-3.0 /Chris1
v1.3 11/10/2012
Minor syntax changes to accomodate for Xcode 4.5 compiler warnings.
Minor changes in .java files to accomodate for Anroid (Google) 2.2 API's compiler warnings.
Minor UI changes in .php files for control panel.
v1.0, 1.1, 1.2 (historical versions, no change details)
JSON Data
------------------------
Most folks use the control panel to configure the JSON data for this plugin but it's useful to
see what it may look like. This is how the JSON will look if you don't use a dataURL to
provide the quiz questions.
{
"itemId":"1111",
"itemType":"BT_screen_quiz",
"navBarTitleText":"My cool quiz",
"childItems":[
{"itemId":"question1UniqueId", "itemType":"BT_quizQuestion", "questionText":"Question 1 text", "correctAnswerText":"Correct", "incorrectText1":"Wrong", "incorrectText2":"Wrong", "incorrectText3":"Wrong"},
{"itemId":"question2UniqueId", "itemType":"BT_quizQuestion", "questionText":"Question 2 text", "correctAnswerText":"Correct", "incorrectText1":"Wrong", "incorrectText2":"Wrong", "incorrectText3":"Wrong"}
]
}
If you provide questions data from a remote file there is no childItems array in the screen
definition in the BT_config.txt file. Instead, the quiz questions are pulled from a remote file.
{
"itemId":"1111",
"itemType":"BT_screen_quiz",
"navBarTitleText":"My cool quiz",
"dataURL":"
http://www.domain.com/theQuizQuestions.php"
}
In this case the questions would come from a backend script at the dataURL. Loading
the dataURL in your browser would produce output like this....
{
"childItems":[
{
"itemId":"question_uniqueId_1",
"itemType":"BT_menuItem",
"questionText":"This is question 1",
"correctAnswerText":"Correct answer",
"incorrectText1":"Wrong",
"incorrectText2":"Wrong",
"incorrectText3":"Wrong"
},
{
"itemId":"question_uniqueId_2",
"itemType":"BT_quizQuestion",
"questionText":"This is question 2",
"correctAnswerText":"Correct answer",
"incorrectText1":"Wrong",
"incorrectText2":"Wrong",
"incorrectText3":"Wrong"
},
{
"itemId":"question_uniqueId_3",
"itemType":"BT_quizQuestion",
"questionText":"This is question 3",
"correctAnswerText":"Correct answer",
"incorrectText1":"Wrong",
"incorrectText2":"Wrong",
"incorrectText3":"Wrong"
}
]
}