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 July 28th, 2010, 10:22 PM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Select A Contact Example decprecated People.NAME

So I noticed in Eclipse that it said People.NAME (P. 149; Step 4.1 of Select A Contact Example) is deprecated. How would this be reproduced with the correct API. I tried to make heads or tails of ContactContract class to no avail.
 
Old July 29th, 2010, 11:18 PM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default List3.java has an example of updated code

So I was looking up something unrelated today, and found List3.java which has an answer to my post.

http://tinyurl.com/2fresnt
 
Old August 12th, 2010, 01:30 PM
Registered User
 
Join Date: Aug 2010
Posts: 13
Thanks: 1
Thanked 2 Times in 2 Posts
Default ContactsContract

I used the ContactsContract to fix.

Code changes for ContactPickerTester:
  • replace People.NAME with ContactsContract.Contacts.DISPLAY_NAME
  • replace Uri.parse("content://contacts/") with ContactsContract.Contacts.CONTENT_URI

Code changes for ContactPicker:
  • don't append "people/" use final Uri data = intent.getData();
  • replace People.NAME with ContactsContract.Contacts.DISPLAY_NAME
  • replace "_id" with ContactsContract.Contacts._ID
 
Old September 6th, 2010, 01:10 PM
Registered User
 
Join Date: Jul 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default juniper fix ?!

juniper,

Your fix works but it doesn't call/use ContactPicker.java.
It seems just calls 'contact' in your avd.

I removed 'ContactPicker.java' and its related elements from 'manifest.xml' and it worked as before.

Reto
,
Shouldn't you include fix to this issue in 'Errata" ?!





Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some help from you people vbpratap VB How-To 2 March 3rd, 2006 08:18 PM
Planoie and People Help ! augustine General .NET 7 August 1st, 2004 09:13 PM
Planoie and People Help ! augustine General .NET 2 July 28th, 2004 09:04 AM
Do people really use DHTML? bekim Javascript 4 June 8th, 2004 08:35 PM





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