Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import android.database.Cursor;

import android.provider.ContactsContract;

public class Main {
    private static Cursor getContactCursor(Context context) {
        return context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                new String[] { ContactsContract.CommonDataKinds.Phone._ID,
                        ContactsContract.CommonDataKinds.Phone.NUMBER,
                        ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME },
                ContactsContract.CommonDataKinds.Phone.NUMBER + " IS NOT NULL", null, null);
    }
}