Query Contacts database, selection with AND to combine more cause.

The previous exercise demonstrate how to "Query Contacts database" for all contacts, "Search for contacts with phone number only" and "Search with selection of LIKE cause". To combine both cause to search for contacts has phone number with certain constraint in DISPLAY_NAME, combine both cause with "AND".

contacts has phone number with certain constraint in DISPLAY_NAME


Change:
String selection = ContactsContract.Contacts.DISPLAY_NAME + " IS NOT NULL";

to:
String constraint = "Lau";
String selection =
ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1"
+ " AND "
+ ContactsContract.Contacts.DISPLAY_NAME + " LIKE '%" + constraint + "%'";

Query Contacts database, search with selection of LIKE cause.

The previous exercise demonstrate how to "Query Contacts database" for all contacts. To search for contacts with certain constraint in DISPLAY_NAME, we can modify the selection using LIKE cause.

Change:
String selection = ContactsContract.Contacts.DISPLAY_NAME + " IS NOT NULL";

to:
String constraint = "Lau";
String selection = ContactsContract.Contacts.DISPLAY_NAME + " LIKE '%" + constraint + "%'";

Query Contacts database, search with selection of LIKE cause.


Android Design in Action: Responsive Design


The special episode focus on tablets and responsive design. Look at the following apps and discuss how they respond to differing device form factors:
-- Android Calendar 3:47
-- Pattrn 8:18
-- Pocket 11:33
-- TED 14:54
-- Google I/O 2012 18:28


Query Contacts database for contacts with phone number only

Last exercise "Query Contacts database" for all contacts. If you want to query contacts with phone number only, simple change the selection:

Change:
String selection = ContactsContract.Contacts.DISPLAY_NAME + " IS NOT NULL";

to:
String selection = ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1";

Query Contacts database for contacts with phone number only

Free ebook: Introducing Windows 8: An Overview for IT Professionals (Final Edition) - from Microsoft



Microsoft Press have released the final version of the ebook Introducing Windows 8: An Overview for IT Professionals, for FREE!

Link: Download PDF

Get a headstart evaluating Window 8—guided by a Windows expert who’s worked extensively with the software since the preview releases. Based on final, release-to-manufacturing (RTM) software, this book introduces new features and capabilities, with scenario-based insights demonstrating how to plan for, implement, and maintain Windows 8 in an enterprise environment. Get the high-level information you need to begin preparing your deployment now.

Topics include:

• Performance, reliability, and security features
• Deployment options
• Windows Assessment and Deployment Kit
• Windows PowerShell™ 3.0 and Group Policy
• Managing and sideloading apps
• Internet Explorer® 10
• Virtualization, Client Hyper-V, and Microsoft Desktop Optimization Pack
• Recovery features


Source: http://blogs.msdn.com/b/microsoft_press/archive/2012/11/13/free-ebook-introducing-windows-8-an-overview-for-it-professionals-final-edition.aspx

Android 4.2 SDK is available



Android 4.2 (Jelly Bean) SDK platform with API level 17 is available now. get started developing and testing, download the Android 4.2 Platform from the Android SDK Manager.

For a complete overview of what's new, take a look at the Android 4.2 platform highlights or read more of the details in the API overview.

Source: Android Developers Blog - Introducing Android 4.2, A New and Improved Jelly Bean.