By Developers, For Developers

Historical errata for Rapid Android Development

PDF PgPaper PgTypeDescriptionFixed onComments
34TYPO

Working off established UI standards, we can build apps that are more intuitively to use, and enable to user to get the job done quickly while on the move.

2012-09-07
45TYPO

Gravity (software-based) Calculates the orientation of the device, returning
a tree dimensional vector indicating the direction and magnitude of
gravity

2012-09-07
65TYPO

Sure, the UI might not adapt as needly if we set num to 100, for example.

2012-09-07
65TYPO

Now that we have an array in which to store our colors, let’s talk about its sidekick: the forloop.

2012-09-07
15SUGGEST

You may want to discuss the need for a USB driver for adb to use USB debugging (See developer.android.com/tools/extras/oem-usb.html for installation instructions). It was not installed automatically for either of my two devices.

2012-11-09Great point Kevin. I'll add it to the next Beta release. \nThanks, \nDaniel
103TYPO

The Processing language and also provide APIs we can use
to analyze, at the pixel level, the content of the images that we capture.

2012-09-07
104TYPO

In the building the game,

2012-09-07Thanks you very much for tracking down those typos! \nDaniel
291ERROR

Appendix 1, A1.1

Jelly Bean (5.0)

2012-09-07Also thanks Kevin for finding the incorrect version number reference. Changed it to 4.1. \nThanks, \nDaniel
53ERROR

Chapter 3.5 “Run the app”

Wrong shortcut in “Remember the shortcut for Run on Device is SHIFT CMD R”. Should be CMD R without shift.

2012-10-29
1SUGGEST

This is a general suggestion pertaining to all ebooks. Is it possible to make the ‘report erratum’ link on each page of the pdf automatically fill the page number field on the web form?

2015-02-18Dear Kevin, \nthanks for your great feedback. If you'd like to be added to the list of tech reviewers, please send me your contact by Nov. 13. \nBest, Daniel
287TYPO

Only Hardware acceleration makes is possible to animate
thousands of data points

2012-11-08
289TYPO

The method define the window
width and height

2012-11-08
290TYPO

Sets Sets the default values for ambient light

2012-11-08
291TYPO

where we translate the our finger position

2012-11-08
291TYPO

into a light direction of the
directional light.

2012-11-08
292TYPO

This time, we don’t need to set Android
permissions or import any libraries since this we are not using hardware that
requires authorization

2012-11-08
295SUGGEST

Create the SPHEREPShape object we’ll use to render the Earth, at a size of
height/3

Change to:

Create the SPHEREPShape object we’ll use to render the Earth, with a size of one third the device screen height

2012-11-09
295TYPO

When we use images as textures for 3D object in Processing

2012-11-08
296TYPO

Now let’s Let’s take only at the parts of the code that deal with the 3D box, and camera texture.

2012-11-08
298SUGGEST

Now that we’ve learned how to work with static and moving image textures, let’s now take a closer look at the different types of light sources we can work with in Processing.

I feel that the second now is superfluous, I’ve noticed it in a couple of other places too.

2012-11-09
298TYPO

and we set increase it to 60 vertices
for per revolution

2012-11-08
299TYPO

We can set the lihgt color

2012-11-08
300TYPO

The pointLight()20 method takes only the light color
and position a parameters.

2012-11-08
302TYPO

They are already present in the on page 300, but currently commented out.

2012-11-08
303TYPO

Using Processing’s createFont()21 method, we can load an already installed system font load it into our app at a defined font size.

2012-11-08
303TYPO

which allows us import any font we’d like

2012-11-08
304TYPO

Both methods require that we set the current font to draw text() in our sketch to the font we’ve created or loaded, using the textFont()23 method.

Insert used? ‘current font used to draw’

2012-11-08
306TYPO

Calculate the distance between the finger tip ant the text position on the screen

2012-11-08
306TYPO

Move your finger across the touch screen surface, and observe how the text closes to the finger tip enlarge

2012-11-08
306TYPO

and make the text we’ll diplay scalable

2012-11-08
307TYPO

Processing has just created a custom Droid Serif font for us to use in our sketch, compiling Processing font file called DroidSerif-48.vlw into our sketch’s
data folder.

2012-11-08
308TYPO

After all, we’ve created the Droid Serif font at 48 points, and because each glyph is rendered as a bitmap images

2012-11-08
308SUGGEST

the same rule applies like for any other pixel image

the same rule applies as for any other pixel image

2012-11-09
310TYPO

becoming bigger as you move down your finger and smaller as you move up.

becoming bigger as you move your finger down and smaller as you move up.

or

becoming bigger as you move your finger down the screen and smaller as you move up.

2012-11-08
15TYPO

Last sentance on the page is “The apps we create can be shard”
Should be changed to “The apps we create can be shared”

2012-12-02
49SUGGEST

I think that the explanation about the method orientation() should not be in the paragraph “Using colors”.

2012-12-02
51ERROR

motionPressure() doesn’t work as described, it returns always the same value when running the code examples in the book at page 51 or 43.
I don’t know if it is an hardaware problem (samsung galaxy S GT I900) or if this method has been dropped,
wiki.processing.org/index.php?title=Android&redirect=no#Mouse.2C_Motion.2C_Keys.2C_and_Input

2012-12-02
28ERROR

motionPressure not working since 2.0b7 as you already probably know

2013-03-14removed, as it will not come back to the Processing core
313TYPO

We us it to navigate

2013-03-14
27ERROR

The fill line should be:
fill(dist(pmouseX, pmouseY, mouseX, mouseY), 1, 1);

2013-03-28Thanks for catching!
59ERROR

Section 3.8, paragraph 2. The text in the PDF version reads “To implement the color picker, let’s rework our code, on page 49,”, but in the Kindle version it’s missing the link text “code, on page 49,”. This also occurs in other links (eg on p56 “Add the code snippet below to the code, on page 49,” is missing the text “code, on page 49”).

2013-03-28Issue reported, no immediate test possible
106TYPO

The two notes starting “Release the camera…” (which would be numbered 7 and 8) are missing their targets in the code.

2013-04-18
5ERROR

I cannot put html in the description, because your form refuses! I’ve tried my best…

footnote 5, second URL is incorrect: “Manindra29/XQMode/XQMode%20v0.4a.zip”

It should be: https://_github.com/Manindra29/XQMode

2013-04-23
27ERROR

order of fields in fill(1, 1, dist(pmouseX, pmouseY, mouseX, mouseY)); is wrong, should be: fill( dist(pmouseX, pmouseY, mouseX, mouseY), 1, 1);

2013-04-23
54ERROR

I love every bit of this book! Here’s a quick eerro

First, the Gyro code snippet is incorrect. It should read:

void onGyroscopeEvent(float x, float y, float z)
{
rotation.x = x;
rotation.y = y;
rotation.z = z;
}

and if the Gyro code snippet is to work then you must also add:

At the global varialbles:
…
PVector rotation;

And in setup(){
…
rotation = new PVector();

And in draw(){ after the Magnetic field stuff:
+ “Gyro :” + “\
”
+ “x: ” + nfp(rotation.x, 1, 2) + “\
”
+ “y: ” + nfp(rotation.y, 1, 2) + “\
”
+ “z: ” + nfp(rotation.z, 1, 2) + “\
”

And you must correct the error in the code snippet:
void onGyroscopeEvent(float x, float y, float z)
{
rotation.x = x;
rotation.y = y;
rotation.z = z;
}

Cheers!

2013-04-23
54TYPO

another error: snippet should be:

void onGyroscopeEvent(float x, float y, float z)
{
rotation.set(x,y,z);
}

then, later on page 55 the PVector variables are incorrectly called accelerometerX, accelerometerY, and accelerometerZ instead of accelerometer.x etc.

2013-04-23The accelerometerX reference is correct for this example, although a departure from the previous example using the PVecor
58SUGGEST

Here, you use individual variables instead of PVector which was carefully explained a fex pages earlier. This is inconsistent and could be confusing for a non-expert programmer.

2015-02-24
62ERROR

The last element of an array is not correctly indicated:

“and the last element, palette.length.”

It should read “palette.length-1” or you will get an error.

2013-04-23
311ERROR

The code for the example ScalableVectorGraphics is missing this import line (in the code download):

import android.view.MotionEvent;

2013-04-18
314ERROR

Same omission as page 311: in the code download as well..

import android.view.MotionEvent;

2013-04-18
317ERROR

same error as p 311,314, missing import in code, also missing in the code download: ObjectFiles.pde

import android.view.MotionEvent;

2013-04-18
322ERROR

mobius.pde:
will not run on my Nexus 4, error message is
“Smooth is not supported by this hardware (or driver)”
Just causes screen to flash black and exit..

2013-04-18Not an issue on tested devices Nexus 7, S
327ERROR

The PShape method .end no longer exists it is replaced by endShape. The downloaded code fails to compile as a result.

Also, like the other Moebius, this code crashes on my Nexus 4, with the error about smooth not being supported.

This whol section about PShapes is very disappointing, I am sorry to have to say…

2013-04-24
236ERROR

the use of Table(this, “groceries.txt”); //(1)

fails at compilation…

cannot find symbol
[javac] symbol : constructor Table(processing.test.datareadgroceries.DataReadGroceries,java.lang.String)
[javac] location: class processing.data.Table
[javac] groceries = new Table(this, “groceries.txt”); //(1)
[javac] ^

This means that all the section on Tables is wrong…

2013-04-18
146ERROR

The part of the osc5 message declaration is inside the onAccelerometerEvent method. Gives an error. The message construction should be inside the draw part.

2013-04-18Not an issue.
7474TYPO

Setting the longitude is shown as a comment. It is also a comment when you download the code Geolocation.pde

double _altitude, float _accuracy) { //(5) longitude = _longitude;

2015-02-24
235TYPO

instead of
…
try{
earthquakes = new Table(this, src);
…
use:
…
try {
earthquakes = loadTable(src); //(2)
…

2015-02-24
222TYPO

5 - Count …in colors
change to:
5- Count … in columns

2015-02-24
160TYPO

Here are the steps we need to take.
…
2 - Import android.content.Intent class because we need onActivityResult(), which is called when the apps starts up immediately before onResume() in the activity cycle. See void onActivityResult(in requestCode, int resultCode, Intent data) method on EnableBluetooh.pde.

2015-02-24
131TYPO

Instead of:
3.Select the Ketai library…
Use:
3.Select the oscP5 library…
That´s it!

2015-02-24
59ERROR

Note 18 is a copy+paste of note 17 explaining onPinch instead of explaining onRotate.

2015-02-24
57SUGGEST

I typed in the code bit by bit and ran the code with first only setup(), draw() and onTap() methods. Could not see anything happening.
So I went on with onDoubleTap() but still nothing. Turned out I needed the surfaceTouchEvent() for it to work, which was obvious once I started to look for problems.
Once I figured this out I could safely refactor a bit to reduce the printing code duplication by implementing my own printEvent() method.

Maybe you should move surfaceTouchEvent() to be the first method after draw() to make the app by default “work” for any number of “onXxx” methods implemented? That way us learners can have an even more incremental approach and fewer speed bumps.

2015-02-24
85SUGGEST

The code in ColorPickerComplete changes the variable names r, g and b (which makes some sense although a bit short for my taste) to ch1, ch2 and ch3 (which makes no obvious sense to me, ch = channel?).
Since the code builds on the previous example I think it should be consistent with it.

2015-02-24
85SUGGEST

The code in ColorPickerComplete changes the variable names r, g and b (which makes some sense although a bit short for my taste) to ch1, ch2 and ch3 (which makes no obvious sense to me, ch = channel?).
Since the code builds on the previous example I think it should be consistent with it.

2015-02-24
97SUGGEST

Speed bump! The section about permissions need to come before the code or the code will fail to run when entered. When I’m done with my code I want to run it immediately. I do not want to read two more pages first.

2015-02-24
95ERROR

Bug: In method onLocationEvent(…) the longitude assignment is commented out.

2015-02-24
221TYPO

There is an error in the code written in the book for DataReadGroceries.pde as the code does not match the downloaded code.

One the first line in the function setup the code reads:

groceries = new Table(this, groceries.txt");

but the downloaded code for DataReadGroceries is:

groceries = loadTable(“groceries.tsv”);

2015-02-24
225TYPO

There is an error in the code written in the book for DataRead.pde as the code does not match the downloaded code.

One the first line in the function setup the code reads:

colors = new Table(this, “colors.csv”);

but the downloaded code for DataRead.pde is:

colors = loadTable(“colors.csv”);

2015-02-24
79-80ERROR

The sentence that straddles pp 79-80 is “We then convert…into miles by multiplying distance by…” implying that the program that follows will convert the distance from meters to miles. However, the program (LocationDistance.pde) does not make this conversion — distance is displayed in meters.

2015-02-24
88ERROR

The type android.location.Location cannot be resolved. It is indirectly referenced from required .class files.
This error occurs (first) at: float bearing = location.getLocation().bearingTo(otherDevice);
Do not have a clue how to resolve it.

2015-02-24
148TYPO

The last 2 lines of the program are

targetX = int(random(25, width - 35));
targetY = int(random(25, width - 35));

I would have expected the ranges to be symmetric. So either the 25’s should be 35 or the 35’s should be 25.

2015-02-24
159ERROR

On p 159 the OscMessage m is created with an addrPattern of “/remoteMouse/” in function mouseDragged(). However, on p 160, when the message is received as a KetaiOSCMessage, the addrPattern is checked for as “/remoteCursor/” (in function onBluetoothDataEvent()) so no communication actually occurs. Making these strings the same fixes the issue.

2015-04-01
249ERROR

This is while running the app DataWriteExternal. The created file can be seen in the device, but when the device is connected to PC, it is not visible in the PC. It turns out that this error is due to a long-standing google bug, see code.google.com/p/android/issues/detail?id=38282 (hyperlinks are not allowed here, so I just deleted the header part of this link). The simplest solution to this problem is to boot the device, a workaround is to run a background app (suggested in the above link) which refreshes the MTP periodically. A permanent solution is not yet available from google.

2015-04-01
252ERROR

This is the code for app Data/DataEarthQuakes. The .txt extension for the file is not accepted by the code, gives this error: “No extension specified for this table”. It works if you change the extension to .csv.

Secondly, the error for DataWriteExternal also occurs for this app in a different way. After running the app successfully once, if you change the name of the internet file and run the app again, the app still thinks it has got the old file-name and then gives some arbitrary error citing some bad data. Again, a device reboot solves this problem. This is with android 4.4.2 and the latest software downloaded.

2015-04-01
187TYPO

Last line says “port 1200”; should be "port 12000)

2015-02-24
30ERROR

2.0 download does not have the Android or Javascript modes pre installed and there are no directions on where to find the necessary files.

“Besides the default Java mode, the drop-down menu in Processing
2.0b8 is already preloaded with the Android and JavaScript mode. In the
final release of Processing 2.0, this drop-down will be slightly different. You’ll
need to add the Android mode, choosing “Add mode…”

2015-02-18

Categories: