Connect your Android device to your computer and simply copy the diy_quiz.txt file that you created to your device's Download folder.

You can also email the file to yourself by adding it as an attachment to the email message. Then open the email on the device and save the file. It should automatically be saved to the device's Download folder.

Remember that the file must be in the Download folder as the Diy Quiz app will only look for the file in this folder

  1. Open up an OpenOffice spreadsheet.
  2. Enter your questions, one per line. Separate fields with the "pipe" character (|). Do not use the pipe character anywhere else in your file. It is used to separate the fields.
  3. Keep the format -- category|question|correct answer|answer 2|answer 3|answer 4|answer 5 -- The first field is the category (or subject), followed by a question. You then need to supply the correct answer followed by four more possible (but incorrect) answers. Each of these fields are separated by the "pipe"character.
  4. Save the file. Select File > Save As from the main menu. Then from the drop down screen:  enter diy_quiz.txt as the File name: and select Text CSV (.csv)(*.csv) as the Save as type: option. "Un-select" the Automatic file name extension box and select the Edit filter settings box. Press the Savebutton to save the file.
  5. In the next pop-up screen, press the Keep Current Format button.
  6. Then, in the next pop-up window, select Unicode (UTF-8) as the Character set, enter the "pipe" character (|) as the Field delimeter and leave the Text delimeter field blank (delete whatever is in there). Press OK.
  7. That's it. You're done.

You can have as many categories and questions as you like (although you probably won't want more than about 10 categories). The order in which you enter the categories doesn't really matter as long as you stick to the format (as described above) for each row. Remember that the trial version only shows two categories.

Once you've downloaded the text file to your device, it will be converted into a database by the app. If you choose to uninstall the app, it won't affect your text file which will remain in the device's Download folder.

    1. Open up a LibreOffice spreadsheet.
    2. Enter your questions, one per line. Separate fields with the "pipe"character (|). Do not use the pipe character anywhere else in your file. It is used to separate the fields.
    3. Keep the format -- category|question|correct answer|answer 2|answer 3|answer 4|answer 5 -- The first field is th category (or subject), followed by a question. You then need to supply the correct answer followed by four more possible (but incorrect) answer. Each of these fields are separated by the "pipe"character.
    4. Save the file. Select File > Save As from the main menu. Then form the drop down window:enter diy_quiz.txt as the File name: and select Text CSV (.csv) (*.csv) as the Save as type: option. Clear the Automatic file name extension box and tick the Edit filter settings box. Click the Savebutton.
    5. In the next pop-up screen, select the Use Text CSV Format button.
    6. Then, in the next pop-up window, select Unicode (UTF-8) as the Character set, enter the "pipe"character (|) as the Field delimiter and clear the Text delimeter field. Press OK.

That's it! You're done.

You can have as many categories and questions as you like (although you probably won't want more than about 10 categories). The order in which you enter the categories doesn't really matter as long as you stick to the format (as described above) for each row. Remember that the trial version only shows two categories.

Once you've downloaded the text file to your device, it will be converted into a database by the app. If you choose to uninstall the app, it won't affect your text file which will remain in the device's Download folder.

Android for beginners. Building a Fuel Consumption Calculator with line by line commentary is aimed at those wanting to develop Android applications without having to dig through piles of technical jargon. It helps you build a working Android application step by step, with line by line commentary explaining each line of code. fuelCover


After working through the tutorial you will have a good understanding of Android application development and will be able to go on to build more complex applications with confidence.

The Consumption Calculator covers all the basics of an interactive Android applications. On first installation it displays a splash screen which checks whether or not a vehicle registration has already been saved. A Main menu then displays, allowing the user to either add a record, edit a record, delete a record or calculate the fuel consumption. The record contains the vehicle registration number, date of entry, odometer reading, total fuel bought and the total cost of the fuel. The record is saved in a Sqlite database.

The database can be searched by date or odometer reading to find a record or to calculate the fuel consumption between two dates or odometer values.

The tutorial takes you step by step, building the project, creating the activities and layout files. Explaining each step, describing each line of code.

You can download all the project files of the working application to validate your progress.

A must have resource for anyone wanting to learn Android application development. 

Available at Amazon.com

Working through this tutorial with step-by-step guidance, you’ll learn how to create an Android application from scratch. You’ll cover all the basic skills that are needed to develop any Android application. You’ll also learn how to display images in a grid, text in a scrollable list, how to create a menu and navigate between screens. World Flags In detail, you’ll learn:

  • How to create a new Android project in Eclipse form scratch
  • How to use resources such as colors, dimensions, strings, string arrays, and typed arrays
  • How to use a Linearlayout
  • How to use a TableView
  • How to use a GridView
  • How to use a ListView
  • How to create a menu
  • How to navigate between Activities
  • How to use a Splashscreen
  • How to use a Worker Thread
Available at Amazon.com

Also available at Kobo books

There are a number of options for saving data in Android applications. This tutorial bundle covers them all. From shared preferences to a SQLite database and Network storage.

Activities book cover

The tutorials have line-by-line commentary and cover each of the main data storage topics in detail. These are:

  • Shared Preferences tutorial – which enables you to save primitive data in key/value pairs so that they persist both across activities and within activities
  • Internal Storage Tutorial – enables you to save data in the device's internal memory. A second tutorial demonstrates how to save data in the internal cache
  • External Storage – this enables you to save data in the external storage area of the device, such as on a SD card. There are three tutorials here, covering saving data in the private and public areas of the external storage device as well as the external cache.
  • SQLite Database Tutorial – the SQLite database enables you to save complex data in a private database which can also be shared between applications
  • Network Connection Tutorial – enables you to store data on the web which you can then access from any device with an internet connection

Mastering these tutorials will give you the confidence to use any of these options to store data in your application.

This ebook assumes that you have at least completed the “Hello World” tutorial that can be found on the official Android website. The tutorials were created using Eclipse (Helios) and targets Android 2.2 API level 8.

Available at Amazon.com

All the tutorial files are available for download at www.101apps.co.za.

You might also be interested in these titles, all available on Amazon.com:

  • Android for beginners: Building a Fuel Consumption Calculator with line by line commentary
  • Android for beginners tutorial. Building your own World Flags Application

Application resources include images, text and music files. It is a good idea to store these in separate folders which makes it easier to maintain the code and to adapt your application for different languages and devices. You simply supply alternative resources for the different languages and devices and the system takes care of the rest.

Android for beginners Tutorials. Application Resources bundle describes the different types of resources that you can use and shows you where to put them. It also shows you how to use alternative resources so that your application can seamlessly work on different devices such as phones and tablets and also with different languages.

Android for beginners Tutorials. Application Resources bundle includes 19 detailed tutorials, with line-by-line commentary, putting the theory into practice.

The tutorials include:

  • View Animation Tutorial – this includes Frame animation where one image is swopped with another and Tweening, where for example some text fades in or out.
  • Color State List tutorial – this tutorial shows how a color state list is used to change the color of an object when it’s state changes.
  • Bitmap Tutorial –this tutorial shows how to use a bitmap both directly and via an alias.
  • Nine-Patch Tutorial – this tutorial demonstrates how to use a nine-patch drawable in an application. It shows how to use it directly from the drawable folder as well as how to define a nine-patch drawable in a XML file.
  • Layer List Tutorial – this tutorial demonstrates how to use a list of drawables saved in a XML file as a drawable object. When the app runs, the drawables in the list are displayed one above the other.
  • State List Tutorial – this tutorial shows how to use a State List to change the background image of a button when the button is pressed, in focused or in default mode.
  • Level List Tutorial - A level list is a drawable object that manages a number of alternative drawables. Each of these drawables is assigned a maximum level. We can then determine which drawable to use by usingsetLevel() in our code, passing it the appropriate level. The drawable with a level equal to or greater than this will be selected.
  • Transition Drawable Tutorial – this tutorial demonstrates how to use a Transition Drawable. A TransitionDrawable is a drawable object that cross-fades between two drawable resources.
  • Inset Drawable Tutorial – this demonstrates the Inset Drawable which we define in a XML file. We then reference it in the layout file to display a drawable in a view where the drawable is smaller than the view’s boundaries
  • Clip Drawable Tutorial – this tutorial demonstrates how to use a Clip Drawable as a simple progress bar.
  • Shape Drawable Tutorial – this tutorial shows how to create and use a Shape Drawable resource as a background image.
  • Layout Tutorial – this tutorial briefly describes the use of layouts.
  • Simple Resources Tutorial – this tutorial demonstrates how to combine a number of resources in one XML file. It covers the use of the following resources: Strings, String arrays, Plurals, Color, Dimensions, Integer arrays, Style, bool, integer and typed arrays.
  • Scale Drawable Tutorial - this tutorial shows how to use the Scale Drawable resource to increase the size of a drawable.
  • Options Menu Tutorial - this tutorial shows how to create a simple options menu.
  • Assets and Raw Files Tutorial - this tutorial demonstrates how to use files in their raw form either from the assets folder or from the res>raw folder.
  • XML File Tutorial - this tutorial shows how to use an XML resource file containing a number of records.
  • Localization Tutorial - this tutorial shows how to accommodate three different languages in an app.
  • Images, Rotation and Orientation Tutorial - This tutorial shows how one can allow for screen orientation changes and different size screens.

Once you have mastered these tutorials, you will feel comfortable creating great apps that will work on any device in any language.

This eBook assumes that you have at least completed the “Hello world” tutorial which can be found on the official Android website. All the tutorials have been written with Eclipse (Helios) as the development environment. Naturally you can use any other development environment.

Available at Amazon.com

 You can download the project files from the download page.