Support for Quizionic - A Quiz App Template for Ionic Framework with SQLite database.

Popular questions for this item

Quizionic doesn’t show questions in Chrome browser

When using Quizionic under browser environment, it’s important that you manually put your populated data.db file in the following folders, depending on your system:


Windows XP

•   Google Chrome: C:\Documents and Settings\ USERNAME \Local Settings\Application Data\Google\Chrome\User Data\Default\databases\http_localhost_8100\
•   Chromium: C:\Documents and Settings\ USERNAME \Local Settings\Application Data\Chromium\User Data\Default\databases\http_localhost_8100

Windows 10 / 8 / 7 / Vista

•   Google Chrome: C:\Users\ USERNAME \AppData\Local\Google\Chrome\User Data\Default\databases\http_localhost_8100\
•   Chromium: C:\Users\ USERNAME \AppData\Local\Chromium\User Data\Default\databases\http_localhost_8100\

Mac OS X

•   Google Chrome: /Library/Application Support/Google/Chrome/Default/databases/http_localhost_8100/
•   Chromium: 
/Library/Application/ Support/Chromium/Default/databases/http_localhost_8100

Once, data.db file is copied in one of the above folder, please rename it as 4 without extension. This is usually the name that Chrome uses to identify this file. It may change to any other number, like 2 or even 5. However, 99% of the time, by replacing it as simple 4 (without any extension) it will work.

Can I use database file from previous Quizionc version 1.1 in 1.2 or 1.2 in 1.3?

Answer is no, you can’t. Reason being is that database schema has changed sightly to incorporate new features and therefore its structure when similar is not equal and certain queries triggered from Quizionic over the database file will fail.

Please ensure that you’re always using the same database file distributed with each version of Quizionic. Remember that even when tables seem to be the same they aren’t as columns have been added to cover new features.

If you need to move data from one previous database file to another, try to export to a csv file and use one of the available tools to re-import and add the missing information in new database schema.

Otherwise, questions won’t appear as expected or application may misbehave.

Can I test Quizionic in Ionic View App?

Even when this is possible, it doesn’t run properly as most of the Cordova Plugins are not properly loaded nor initialized under Ionic View App and therefore, you won’t see Admob, InAppBrowser, SQLite or CopyDB plugin working on such environment.

Please don’t use this option when attempting to test Quizionic. Preferably, you should run Quizionic directly on your device or under local server.

Issues with plugins – App doesn’t compile or doesn’t run

As general rule, when updating or changing plugins in your Ionic project, the best way to start solving this issue is to do the following:
ionic platform remove ios (or android) or both depending your case ionic platform add ios (or android or both) depending your case ionic prepare ionic build ios (or android or both) depending your case

Please note, that there are config files (json, bower, gulp) under your project’s platform folder that may be incorrectly formed when updating/changing plugins. Therefore, you can even delete the platform folder entirely when facing issues as this folder will be recreated after invoking the “ionic platform add” command.

If this doesn’t work neither, then you should probably start a new project from scratch to avoid any previous project history. This will offer a clean start.

Quizionic version 1.3 don’t use all the same plugins as version 1.2, so please also verify them according to information provided in documentation folder Index.html file.

Finally, be aware of Ionic, Cordova and plugins versions.

Quizionic version 1.3 has been built with:

(_) (_) _ ___ _ __ _ ___ | |/ _ \| '_ \| |/ __| | | (_) | | | | | (__ |_|\___/|_| |_|_|\___| CLI v1.7.14 and Cordova version 6.0.0 and Latest Ionic version: 1.2.4 (released 2016-01-08) cordova-plugin-admobpro 2.12.1 "AdMob Plugin Pro" cordova-plugin-console 1.0.2 "Console" cordova-plugin-device 1.1.1 "Device" cordova-plugin-extension 1.2.9 "Cordova Plugin Extension" cordova-plugin-file 4.1.1 "File" cordova-plugin-file-transfer 1.5.0 "File Transfer" cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin" cordova-plugin-inappbrowser 1.2.1 "InAppBrowser" cordova-plugin-payment-iap 2.0.46 "Cordova IAP plugin" cordova-plugin-splashscreen 3.1.0 "Splashscreen" cordova-plugin-statusbar 2.1.1 "StatusBar" cordova-plugin-whitelist 1.2.1 "Whitelist" cordova-plugin-x-socialsharing 5.0.10 "SocialSharing" cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)" ionic-plugin-keyboard 1.0.8 "Keyboard" me.rahul.plugins.sqlDB 1.0.3 "sqlDB"

App doesn’t open in Genymotion – Android version

If you are working with Cordova 5.3.3 and you’ve added Crosswalk browser to it to Quizionic project, you may experiment some issues when trying to open the app in Genymotion and eventually in your device.

This is fixed with Cordova 6.0.0. Then you can add it by typing:

ionic browser add crosswalk

How to install a specific plugin version in Quizionic Ionic project

If you need to install a specific version of a plugin, you can type the following command in your ionic cli terminal:

cordova plugin add plugin-name@version

For instance, to install the payment plugin version 2.0.46, you should type:

cordova plugin add cordova-plugin-payment-iap@2.0.46

How to verify installed versions of Ionic, Cordova and plugins in my Quizionic project

To verify what’s your current Ionic CLI version, just type: ionic -v

To verify Ionic Framework: ionic lib

For Cordova: cordova -v

For plugins: cordova plugins

How to test Quizionic in Safari Browser

To test Quizionic in Safari browser by invoking “ionic serve” command, you should first put data.db file in Safari’s folder location as follow:

In OSX, Safari’s folder is under: /Library/Safari and your Quizionic data.db file shall be copied here before to start testing it under Safari:

/Library/Safari/Databases/http_localhost_8100 (this folder is assumed as default when running Ionic Serve, however it might be different if you have configured other port for your Ionic Serve Service).

When you first attempt to run Quizionic under Safari, without doing the copy of your www/data.db file in ~/Library/Safari/Databases/http_localhost_8100/ folder, Safari will create a coded name for an empty database file for your Quizionic App. As that file is created empty, you won’t see any Exam in the Main Menu of Quizionic. However Safari uses a coded file name in the format of: 17b8b1c8-eba3-4f44-ab55-98195bd7c413.db to identify the created file.

In order to get your data properly installed under Safari’s folder, you have 2 options here:

1st (easy method),
- Run Quizionic first time under Safari
- Locate ~/Library/Safari/Databases/http_localhost_8100/ folder
- Observe the created .db file under such folder, usually in the form of: 17b8b1c8-eba3-4f44-ab55-98195bd7c413.db
- Copy your Quizionic/www/data.db file into above folder
- Remove the file: 17b8b1c8-eba3-4f44-ab55-98195bd7c413.db or your similar one
- Rename the copied data.db file by previous removed file name
- Reload the your app in Safari or invoke “ionic serve” command again

2nd method (you need a SQLite tool)
- Run Quizionic first time under Safari
- Locate ~/Library/Safari/Databases/http_localhost_8100/ folder
- Copy your Quizionic/www/data.db file into above folder
- Open the ~/Library/Safari/Databases/Databases.db file with your SQLite tool, like Navicat or any other.
- Once opened the Databases.db file, open the Databases table
- Locate the entry (row) where it has the following columns with these values:
guid: nn
origin: http_localhost_8100
name: data.db
displayName: my
estimatedSize: 819200
path: 17b8b1c8-eba3-4f44-ab55-98195bd7c413.db (this value might be different in your case)
- Change column path’s value with data.db file
- Reload the your app in Safari or invoke “ionic serve” command again

Remember that every time you do a modification in your www/data.db file, you must copy manually that file on above folder and apply any of the two methods mentioned above, to refresh the modified database file under Safari execution.

How to configure In-App-Purchase

To learn about how in app purchases work on each of the platforms, read Apple’s In-App Purchase Programming Guide and Google’s In-app Billing Overview.

The first step is to configure your app and the products you would like to offer on iTunes Connect and Google Play Developer Console.

Once you have your app bundle id (such as com.yourcompany.appname) and the product’s ids (such as com.yourcompany.appname.product1 etc), set your app bundle id in the config.xml file and add the products to the productIds array in the www/js/app.js file, line 9

If you are building an app for iOS you are ready to go. On Android, you need to find your Android Billing Key under the Services & APIs section in the Google Play Developer console, and change it to line 7 of www/js/apps.js file.

Note that on Android, you must sign and publish your app as alpha or beta version and then make sure your Google account is set as a tester for this app. On Apple, you will need to configure and set up a test user account and login with this account to iTunes on your device.

Show more