Wrox Programmer Forums
|
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2010, 01:45 AM
Authorized User
 
Join Date: Mar 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default chapter 5 ContactPicker

The book is showing incorrect coding on ContactPicker and ContactPickerTester. On both class, I had to replace

Code:
final Cursor c = managedQuery(data, null, null, null);
to this

Code:
final Cursor c = managedQuery(data, null, null, null, null);
 
Old April 9th, 2010, 02:09 AM
Authorized User
 
Join Date: Mar 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default

I get a force close after clicking "pick contact" but if I replace

Code:
Intent intent = new Intent (Intent.ACTION_PICK, Uri.parse("content://contacts/"));
with

Code:
Intent intent = new Intent (Intent.ACTION_PICK, Uri.parse("content://contacts/people"));
it works.

Is the replacement code what the book should have? or I have incorrect coding in my source code?
 
Old April 9th, 2010, 03:12 AM
Authorized User
 
Join Date: Mar 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default

duh, "content://contacts/people" is for the native contact list. "content://contacts/" works. I had a typo on my listitemlayout.xml. The culprit

Code:
android:layout_heigth="wrap_content"
I missed spelled height.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.