Create an AppaApps Photo App!

Last updated on 2018-Jan-22.

If you can create an annotated slide show, then you can create an Android App just like Cars, Cranes, Trucks, Trains in Italian and publish and distribute it as you wish.

    Create an AppaApps Photo App!
    How to write an AppaApps Photo App
        Things you will need to create the app
            Knowledge
            Computer
    Detailed Instructions for creating an AppaApps Photo App
        Create a free account on GitHub
        Create a new repository on GitHub
        Authorize Appa Apps to collaborate with you on your app
        Authorize Appa Apps to send you files
        Add some interesting photos to the images/ folder
        Write the facts for each photo
    Layout and meaning of sourceFile.txt
        Commands
        Keywords and values
            app
            photo
            fact
        Matching names
    Useful links

How to write an AppaApps Photo App

To create an app in the Appa Apps format follow these instructions:

  1. Create a free account on GitHub if you do not already have one.
  2. Create a new repository on GitHub to contain the definition of your app.
  3. Authorize Appa Apps to collaborate with you on your app.
  4. Authorize Appa Apps to send you files.
  5. Put some interesting photos that you wish to display into a folder called images/ in your new repository.
  6. Write down the facts that you wish to present for each photo by saving the facts as text in a file called sourceFile.txt in your new repository.

GitHub will then tell Appa Apps to generate the app for you: GitHub will send you details in an email when the app is ready for you to download and play.

If you get stuck, create an issue against your repository by clicking on the word Issues in the top center of your repository's home page: Appa Apps will be pleased to collaborate with you to resolve the issue.

Things you will need to create the app

Knowledge

The most important thing you will need to write an interesting app is interest and knowledge about a subject that you can illustrate with photos and describe with facts. For example: if you are know a lot about horses; have access to lots of illustrative photos of horses doing interesting things; and you can describe the important features of these photos in a few succint words; then you have a good basis for writing an interesting app about horses. Or perhaps jet aircraft. Or growing roses.

Computer

You will also need a small amount of computer equipment:

  1. A computer with an Internet connection
  2. An Android device if you want to play the app as a native Android app on a phone or tablet
  3. An account with: Amazon App Store if you want to add advertising to your app in the hope of generating revenue.

Detailed Instructions for creating an AppaApps Photo App

Create a free account on GitHub

Create a free account on GitHub if you do not have one

Go to GitHub and follow the instructions there to create a free account. Sign in to GitHub after you have created your account!

Create a new repository on GitHub

Once you have signed into your GitHub account, you an create a new repository:

Push the "plus" sign at the right hand end of the title bar and choose new repository from the menu.

Choose a simple, short name for your repository: please make sure that the name of the repository contains only letters and numbers drawn from a through z, A through Z, 0 through 9 and _ (underscore). The name must not contains any spaces, commas or any other punctuation characters else chaos will ensue.

Initialize the repository with a README. At this point you can skip the other options: GitIgnore and choosing a licence.

Press the green Create Repository button to create the repository.

Authorize Appa Apps to collaborate with you on your app

Once you have created a repository on GitHub you should invite Appa Apps to be a collaborator by clicking the word Settings in the top center of your repository's home page, then click Collaborators at the top of the left side bar:

Enter AppaApps as the name of the collaborator in the search box and push the button: Add collaborator. AppaApps will now be able to answer any questions you pose by creating issues on GitHub. To create an issue, click on the word Issues in the left top corner of your repository's home page.

Authorize Appa Apps to send you files

You should also authorize Appa Apps to write files to your repositories by following the following steps:

Goto tokens. You will be asked to logon and then see:

Click on Generate New Token in the top right corner.

Give the token a convenient name of your choosing.

In the first box below the name field, select: repo - Full control of private repositories

In the fourth box down chose: admin:repo_hook

At the bottom of the page press the green button: Generate Token

You will then see your new token on a pale green background.

Please send this token by email to philiprbrenan@gmail.com who will install it on Appa Apps allowing Appa Apps to send you files. The easiest way to do this is to copy the token to your clipboard by clicking on the clipboard sign next to it and then pasting it into the email. Please include the following statement in the email:

I understand that by sending philiprbrenan@gmail.com this token I have compromised the security of all the repositories under the userid associated with this token: I can and do absolve philiprbrenan@gmail.com from all responsibility for maintaining the security of this data because it contains nothing confidential and is it is fully backed up elsewhere.

You can withdraw the permissions associated with the token or change them at any time with immediate effect by returning to this page.

Appa Apps will then be able to generate your app for you from the information you place in the repository.

Add some interesting photos to the images/ folder

Now that you have a repository ready to go you can start development of your app. The first thing to do is to find some of photos that illustrate the points you wish to make and load them into the images/folder in your new repository. To do this, click on images:

which will take you into the images folder.

Click on the upload files tab to get:

Click on the choose your files link:

On this page you can choose the files you wish to upload.

You will probably find it easiest to load a small number of images first, say three or four, so that you can create a prototype app and then improve it by adding more photos as you see fit.

Every time you save a photo into your repository Appa Apps, being a collaborator, will receive a message indicating that this has been done. Appa Apps responds to this message by creating or updating the file sourceFile.sample.txt in your repository. This file shows what a very basic app using these photos you have supplied might look like and so serves as a useful template for further development.

Write the facts for each photo

You should write the facts for each photo in a file called sourceFile.txt. You can have as many srcFile files as you wish in your repository as long as they are in separate folders as you can see in: The Numbers from 0 to 100 which uses one folder to hold the sourceFile.txt file for each language.

Each time you save a new version of any sourceFile.txt into your GitHub repository, Appa Apps will try to generate an app from the definition held in the file and will notify you of the results of the generation process by email.

An easy way to create the sourceFile.txt file is to copy the contents of sourceFile.sample.txt which is a sample version of this file created for you by Appa Apps each time you save a photo into your images/folder.

Here is a sample listing of the files in a GitHub repository:
images Add files via upload a month ago
out/state No commit message 6 days ago
README.md Update README.md a month ago
app.html No commit message 2 days ago
app.log No commit message 2 days ago
sourceFile.sample.txt No commit message a month ago
sourceFile.txt Update sourceFile.txt 2 days ago

You can see the images/folder on the first line and the files sourceFile.sample.txt and sourceFile.txt on the last two lines.

The file: sourceFile.txt will be processed by a computer at Appa Apps to create your app. Consequently, the information in this file has to be organized in a specific manner so that it can be processed by a computer rather than an intelligent human being.

A complete definition of the format of this file is given in section Layout of sourceFile.txt.

For your first app the easiest thing to do is use sourceFile.sample.txt as an example and type the facts that you are going to use over the text "First fact about" and "Another fact about" and save the results in file: sourceFile.txt in your new repository.

You are bound to make mistakes in the process of generating an app, but such mistakes are not fatal because you can always try again. If Appa Apps cannot generate an app for you from the information you have provided in sourceFile.txt, then Appa Apps will create an issue on GitHub explaining the problem and you will be notified of this by email. You can use this information to correct your sourceFile.txt. When you commit this file to GitHub, Appa Apps will try to generate the app again for you.

If you get hopelessly stuck, just create an issue yourself by clicking on the word Issues located in the top left corner of the home page for your repository (just under then name of your repository) and some-one at Appa Apps will be pleased to respond if Appa Apps has been invited to act as a collaborator on your app.

Appa Apps will attempt to regenerate your app each time you commit a new version of sourceFile.txt, that is you save your latest version of this file to your repository on GitHub. You do not need to perform any other action other than reading the email that GitHub sends you once Appa Apps has finished regenerating your app for you.

If Appa Apps successfully creates an app for you from the photos and facts that you provided in sourceFile.txt, the email from GitHub will tell you where to go to download your app from the cloud to your phone and where you can play the app in your web browser. This allows you to try out the latest version of your app immediately and make any improvements you think desirable after seeing your app in action.

Layout and meaning of sourceFile.txt

The source file: Cars, Cranes, Trucks, Trains in Italian contains the sourceFile.txt for this app as published on Google Play: Cars, Cranes, Trucks, Trains in Italian

Please feel free to copy and modify it as you wish.

Commands

An app description tells Appa Apps how to create an AppaApps Photo App for you using commands in a well defined language. This language has been designed to be simple to code by non technical authors yet powerful enough to express the information required to fully define an AppaApps Photo App.

An app description starts with a single app command followed by additional photo and fact commands. The action of each command is defined by the values of its associated keywords. The commands and their keywords tell Appa Apps how to create the app for you. You can add notes to yourself by coding a # sign followed by the content of your note up to the end of the same line.

CommandDescription
appThe first command should be an app command whose keywords specify global values for the app.
photoFor each photo that you want to include in an AppaApps Photo App, you should code one photo command to give the photo a name and title and to tell Appa Apps where the photo is located on the Internet so that the photo can be retrieved and displayed in the app.
FactUse the fact command to provide facts for each photo. These facts will be used to teach and then test the users of the generated app.

Keywords and values

The action of each command is modified by its following keyword = value pairs, coded one pair per line. Upper and lower case are interchangeable in keyword names and underscores _ are not considered significant, so, for example, you can code the keyword:
fullPackageNameForGooglePlay
as:
full_package_name__for___Google______play
if you wish.

Values occupy the remainder of the line. Leading and trailing whitespace around the value will be ignored.

You can turn a keyword = value line into a helpful comment that will be ignored by Appa Apps by preceding the line with a # as in:
# maxImages = 12

Later on, if you change your mind and want Appa Apps to take note of this information, you can remove the # to bring the keyword and its associated value back into play.

Here is a list of the current keywords, their possible values and what happens if you code them:

CommandKeyRequiredDescriptionDefaultPossibilities

app

Outline description of an app
authorauthorThe name of the person who wrote this app
description

A slightly longer description for the app often used for the short description on Google Play.

email

The email address of this app so that students have somewhere to send suggestions, corrections or complaints

emphasis

Generate slower, more emphatic speech for some items so that a student who did not understand the normal fast speech version can be given a slower, more comprehensible version on redirect.

Code a number for the value of this keyword: any phrase that is shorter than this will cause both normal and emphasised versions of the speech to be generated. Phrases longer than this number will only cause a normal version of the speech to be generated.

If you ommit this keyword or code a value of zero then only normal speech versions will be generated.

enables

The names of apps that the user might enjoy playing after completing this app. If the student appears to have mastered all the material in this app the app will start playing one of these apps instead.

fullNameOnGooglePlay

The full name of the the app on Google Play. This is set by default for you to the standard value of: com.appaapps.photoapp.<github path to your sourceFile.txt>

Use this keyword to change this name to something else in the unlikely event that you want to use a different name on Google Play for your app.

icon

If the url starts with https?:// then this is the location of the icon image on the World Wide Web from whence it will be copied and scaled to the right size. Otherwise it is the name of the file in the images/folder in the GitHub repository for this app which contains the icon for this app.

imageFormat

Use jpx to display high resolution images in this app, otherwise use jp to display normal images.

jpjpx
language

The two character code which describes the language this app is written in. All the voices that speak this language will be used to speak the app unless the app.speakers= keyword is used to specify the speakers that you require.

ency da de es fr is it ja ko nb nl pl pt ro ru sv tr
maxImages

The maximum number of images to show in one selection at a time in the app: choose a value that reflects how many images a competent student might reasonably scan in 30 seconds

122 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
maximumRaceSize

The maximum possible number of questions that can occur in a race. Otherwise, the default is the total number of photo commands in the app. However, the student will only be faced with the maximum possible number of questions once they have made considerable progress through the material in the app as races are restricted to information that the student has already encountered.

namenameA short name for this app
ordered The next item to be presented to the student will be chosen in some kind of order if this keyword is coded:

always
The items tend to be presented in the order they are written in the app definition file.
finally
The opposite of initially. The items are initially presented in random order but the order is applied ever more strictly as play proceeds.
initially
As with always, the items are initially presented in order, but the order is applied less and less strictly as play proceeds.
never
The opposite of always. The order of the items is not considered to be important. This is equivalent to not coding this keyword or commenting it out.
neveralways finally initially
prerequisites

The names of apps that perhaps the user ought to play first, listed in play order separated by spaces. If the student does not appear to be making much progress with the existing app, the app will start playing one of these apps instead.

rightInARow

The number of questions the student must answer correctly in a row to trigger race mode.

In normal play the student receives new items of information every time they answer a question correctly the first time the question is posed and answers are provided for questions that the student is unable to answer correctly.

During a race, no new items of information are presented: the race continues as long as the student does not make too many mistakes or until all the items that the student has previously identified correctly have been presented. Race mode questions are presented with less delay than normal questions.

The race starts with well known items and with quiet background music. As the race proceeds, the music gets louder and the questions become more difficult as measured by how often the student has correctly identified the items in the past.

The objective of a race is to set a personal best time for completing a race through all the items in the app without errors.

At the end of race, the student is congratulated if they did not make too many mistakes. Play then reverts to normal mode.

72 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
saveScreenShotsTo

Code this keyword in the unlikely event that if you would like screen shots taken in the app to be saved to a different GitHub repository. Code the GitHub user name, followed by '/', the repository name, optionaly followed by a path which will be prefixed to the screen shot name.

This feature only works for the first two hours after an app has been created: after that the app plays normally.

screenShots

Screen shot mode is enabled if this keyword is present with any value or indeed no value. See: the photo.screenShot= keyword for full details.

See also the app.saveScreenShotsTo= keyword for details of how to specify an alternate repository in which to save screen shots.

speakers

The Ids of the voices to be used to speak the app or all the speakers in the language set by app.language= keyword.

titletitleThe title for this app
version

The version of this app.

photo

Description of a photo that illustrates one or more facts
aFewCharsaFewChars or url

One or two characters to display in the center of the screen either in lieu of a photo or on top of a photo in alphabet and number games

level

The level of play at which the user should be introduced to this photo and its related facts. If no level is associated with a photo or it has a level of 1 then the photo is introduced at the first level of play.

12 3 4 5 6 7 8 9 10
mapsOptional url showing a map of where this photo was taken
namenameA short name for this photo which will be matched against fact names as described in matching names.
pointsOfInterest

Indicate points of interest in a photo by coding the fractional coordinates of each point of interest as percentages from left to right and top to bottom of the photo searated by white space.

For example, the center of the upper right quadrant is:

  75 25

The points of interest should be coded in order of decreasing interest, for example: if the center is the most interesting point in the photo followed by the center of the upper right quadrant, then code:

  50 50 75 25

All characters that are not the digits 0..9 will be converted to white space, which means that the above could be coded as:

  (50x50), [75 25];

Any missing coordinates will be assumed to have a value of 50

Points of interest are used (amongst other things) to center screen shots, as far as possible, on the most interesting point in the photo.

sayThe actual sequence that should be said by AWS Polly if this is different from the content of the photo.title= keyword
screenShot

Code this keyword if you would like this photo to be made into a screen shot. You will need screen shots to upload your app to distribution web sites. This keyword gives you a convenient way to mark the photos in your app that would make the best screen shots.

To actually take screen shots you will needs to code the app.screenShots= keyword to temporarily enable screen shot mode. During screen shot mode, the app shows just the indicated items either centered on their first point of interest or moving so slowly that you can manually swipe the screen to take the shot when the photo is best presented on the screen.

By default the screen shots will be placed in your GitHub repository in:

  out/screenShots/photoname.jpg.

However, you can specify an alternate repository in to which screen shots are to be saved, see the app.saveScreenShotsTo= keyword for details.

This feature only works for the first two hours after an app has been created: after that the app plays normally.

titletitleThe title for this photo
urlaFewChars or url

If the url starts with https?:// then this is the location of the image on the World Wide Web from whence it will be copied. For example:

  https://upload.wikimedia.org/wikipedia/en/7/7d/Bliss.png

If the url starts with github:// then this is the location of the image in another GitHub repository: code the user name, '/', repository name, '/', followed by the path in the repository to the image file. For example:

  github://philiprbrenan/vocabulary-1/images/Ant.jpg

Otherwise it is the name of a file in the images/folder in the GitHub repository for this app. For example:

  Ant.jpg
wikiThe url of the Wikipedia article describing the concept this photo illustrates

fact

A fact about one or more of the photos that the student can be tested on
aspectThe aspect of the photo under consideration which allows facts from different photos to be matched during the wrong/right response display.
namenameA short name for this fact which will be matched against photo names as described in matching names
remarkAn explanation of why this fact cannot be used as a question if, in fact, this fact cannot be used as a question
sayThe actual sequence that should be said by AWS Polly if this is different from the title= keyword
titletitleThe text of this fact
wikiThe url of the Wikipedia article about this fact

Compressed Syntax

Normally you should place the command name alone on the first line and then follow the command with one or more keyword = value pairs on subsequent lines. To save space, the command and the name and title keywords can be combined into one line. So the code:

  photo
    name  = white.cliffs
    title = The "White Cliffs of Dover" from an arriving ferry

can be combined to save space by writing it as:

  photo white.cliffs = The "White Cliffs of Dover" from an arriving ferry

Matching names

An app is built from photos and facts. Each corresponding photo and each fact should have a name = value keyword/value pair to specify a label and description for the photo or fact. The names are matched so that in the following:

  photo sky       = The sky above us
  photo sky.blue  = Blue skies over the sea
  photo sky.red   = Sunset

  fact sky      = The heavens above us
  fact sky.blue = Lots of sun shine soon
  fact sky.grey = Rain will fall soon

the following matches will be made:

CommandNameApplies to
fact sky All three photos.
fact sky.blue The photos "The sky above us", "Blue skies over the sea" but not "Sunset".
fact sky.grey None of the photos.
photosky All three facts.

The student will be tested on the word sky and the phrase "The sky above us" using all three photos.

However, with the above source code the student will never see "Rain will fall soon" as the fact named sky.grey does not match the name of any photo. Adding a photo with a name, for example, sky.grey.rain would bring this fact into play by matching the name of the photo with the fact's name of sky.grey.

Useful links

Speakers available Speakers available on Amazon Web Services
Source for sample app Cars, Cranes, Trucks, Trains in Italian
Sample app on Google PlayCars, Cranes, Trucks, Trains in Italian
App command keywords app
Photo command keywords photo
Fact command keywords fact
Contact address philiprbrenan@gmail.com