Demonstrates launching the contacts app to pick a contact
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package app.test; import android.app.Activity; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.SystemClock; import android.os.Bundle; import android.provider.BaseColumns; import android.provider.ContactsContract; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; import java.util.Calendar; /** * Demonstrates launching the contacts app to pick a contact. Does not * require permission to read contacts, as that permission will be granted * when the selected contact is returned. */ public class PickContact extends Activity { Toast mToast; ResultDisplayer mPendingResult; class ResultDisplayer implements OnClickListener { String mMsg; String mMimeType;