Code example for Intent

Methods: setComponentsetFlags

        return ContentUris.withAppendedId(Calls.CONTENT_URI, cursor.getLong(0));
    /** Creates an intent that is bound to a specific activity by name. */ 
    private Intent bindIntentToClass(Intent intent, String activityClassName) {
        intent.setComponent(new ComponentName(ANDROID_CONTACTS_PACKAGE, activityClassName));
        return intent;
    private Intent buildFilterIntent(int actionCode, boolean legacy) {
        Intent intent = new Intent(UI.FILTER_CONTACTS_ACTION);
        intent.putExtra(UI.FILTER_TEXT_EXTRA_KEY, "A");
//        ContactsRequest request = new ContactsRequest(); 
//        request.setActionCode(actionCode); 
//        intent.putExtra("originalRequest", request); 
        return intent;
    private void startContactListActivity(Intent intent) {
        bindIntentToClass(intent, CONTACT_LIST_ACTIVITY_CLASS_NAME);
    private void startContactSelectionActivityForResult(Intent intent) {
        startActivityForResult(intent, 12);
Stop searching for code, let great code find you!  Add Codota to your java IDE