Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Safari Books Online 14.1

I was trying to implement the simple dialing example 14.1

I kept getting an error in the emulator
something like 'the application was forced to quit'
I never got to the display screen illustrated in the book

also the debugging sequence would terminate on the last step

I downloaded the examples from the website and I copied and pasted from the book. Neither worked.


Then I remembered your earlier section on permissions. Your manifest.xml for this example never asked permission to make telephone calls. I added this permission line to the xml and the example then worked.

<uses-permission android:name="android.permission.CALL_PHONE" />

The good news is that your earlier section on permissions seemed to have the desired impact. The bad news is that your example at the book's website is incomplete and the text in the book needs a warning about permissions.

thanks

swilson 
Printed Page 35
Boxed Text

The author/editor's glib replies to several questions about problems with installing and running the .apk are very annoying. As a previous comment said:

Can you please provide readers with an *exact* list of the most recent software - AVD device version, SDK version, ADT version, along with instructions to get the MJAndroid to run?

We paid good money for your book. This is incredibly frustrating."

I purchased this book from Amazon and there will be no problems in returning this book and getting my money back.

Elwood Hunt 
PDF Page 43
Section 3.5.2

I am beginning to feel somewhat frustrated at trying to get MJAndroid to run, so I backtracked to AnroidUIDemo, which also didn't run, however that one was relatively easy to fix once I found the duplicate R.java file in src.
Now back to the main project which we need to work. I have removed and reinstalled it several times, here's where I am - without having touched anything yet and just wanting it to build/run:

[2009-08-19 16:12:36 - MJAndroid] no classfiles specified
[2009-08-19 16:12:36 - MJAndroid] Conversion to Dalvik format failed with error 1

Hopefully someone can clear that one up as the book makes no mention of issues other than the apk file when first running the project.

Thanks in advance

Lee Crampton 
PDF Page 46
Downloading the MJAndroid Code

I'm Using Vista Business sp1 eclipse 3.5 android-sdk-windows-1.5_r3

Can upzip to workspace OK
After import and build before running Get 9 errors (red cout) Only 6 red markers ?

public class MicroJobsDatabase extends SQLiteOpenHelper
SQLiteOpenHelper cannot be resolved to a type

LIKEWISE
public static class EmployersCursor extends SQLiteCursor
private static class Factory implements SQLiteDatabase.CursorFactory
public static class JobDetailCursor extends SQLiteCursor
private static class Factory implements SQLiteDatabase.CursorFactory
public static class JobsCursor extends SQLiteCursor

There's a red marker for
private void execMultipleSQL(SQLiteDatabase db, String[] sql){
for( String s : sql )
if (s.trim().length()>0)
db.execSQL(s);
}
In package explorer not in java detail


MicroJobsDatabase.java
package com.microjobsinc.mjandroid;

import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteCursor;
import android.database.sqlite.SQLiteCursorDriver;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQuery;
import android.util.Log;

Note source code marked EARLY_RELEASE_VERSION-20081222 Oreilly has it dated 12-Aug-2009
also some of it has SVN files with it.


Arthur M 
Printed Page 264
3rd paragraph

The book says:

*
As a result, our SayHello activity is launched because it has an Intent filter that matches the parameters we have set in this Intent object.
*

That would be true if we had set an Intent filter on the SayHello activitiy. Unfortunately there's no hint on the book where and how to do that. I got the example up and running extending the application's manifest with an appropriate filter:

<activity android:name=".SayHello" android:label="@string/app_name" android:exported="true" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.example.greeting/vnd.example.greeting-text" />
</intent-filter>
</activity>

Stefan 


"I'm no super developer and I need stuff like this, that can take things a little more slowly and make it all clear. "
--JR Peck, Slashdot.org