Code example for ListFragment

Methods: startActivityForResult

0
	} 
 
	private void startContactListActivity() { 
		Intent intent = new Intent(Intent.ACTION_PICK);
		intent.setType(ContactsContract.Contacts.CONTENT_TYPE);
		startActivityForResult(intent, 1);
 
	} 
 
	@Override 
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		Uri dataUri = data.getData();
		Context context = GlobalApplication.getGlobalApplicationContext();
		Cursor cursor = context.getContentResolver().query(dataUri, null, null,
				null, null); 
		String people_Number = null;
		while (cursor.moveToNext()) {
			int getcolumnId = cursor
					.getColumnIndex(ContactsContract.Contacts._ID);
			long id = cursor.getLong(getcolumnId);
			String people_Name = cursor