Android ContentProviderOperation.Builder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ContentProviderOperation.Builder class.

This code example shows how to use the following methods: clear, put, withValues
        return this;
    } 
 
    public ContactOperations updateDirtyFlag(boolean isDirty, Uri uri) {
        int isDirtyValue = isDirty ? 1 : 0;
        mValues.clear();
        mValues.put(RawContacts.DIRTY, isDirtyValue);
        addUpdateOp(uri);
        return this;
    } 
 
    /** 
     * Updates contact's phone 
     * 
     * @param existingNumber phone number stored in contacts provider 
     * @param phone new phone number for the contact 
     * @param uri Uri for the existing raw contact to be updated 
     * @return instance of ContactOperations 
     */ 
    public ContactOperations updatePhone(String existingNumber, String phone, Uri uri) {

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: clear, put, size, withValues
		mIsNewContact = false;
		mRawContactId = rawContactId;
	} 
	 
	public ContactOperations addName(String firstName, String lastName) {
		mValues.clear();
		 
		if (!TextUtils.isEmpty(firstName)) {
			mValues.put(StructuredName.GIVEN_NAME, firstName);
			mValues.put(StructuredName.MIMETYPE,
					StructuredName.CONTENT_ITEM_TYPE);
		} 
		if (!TextUtils.isEmpty(lastName)) {
			mValues.put(StructuredName.FAMILY_NAME, lastName);
			mValues.put(StructuredName.MIMETYPE,
					StructuredName.CONTENT_ITEM_TYPE);
		} 
		if (mValues.size() > 0) {
			addInsertOp(); 
		} 

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: clear, put, size, withValues
     * @param name Name of contact 
     * @param nameType type of name: family name, given name, etc. 
     * @return instance of ContactOperations 
     */ 
    public ContactOperations addName(String firstName) {
        mValues.clear();
        if (!TextUtils.isEmpty(firstName)) {
            mValues.put(StructuredName.GIVEN_NAME, firstName);
            mValues.put(StructuredName.MIMETYPE,
                StructuredName.CONTENT_ITEM_TYPE);
        } 
        if (mValues.size() > 0) {
            addInsertOp(); 
        } 
        return this;
    } 
 
    /** 
     * Adds an email 
     *  

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: clear, put, size, withValues
     * @param name Name of contact 
     * @param nameType type of name: family name, given name, etc. 
     * @return instance of ContactOperations 
     */ 
    public ContactOperations addName(String firstName) {
        mValues.clear();
        if (!TextUtils.isEmpty(firstName)) {
            mValues.put(StructuredName.GIVEN_NAME, firstName);
            mValues.put(StructuredName.MIMETYPE,
                StructuredName.CONTENT_ITEM_TYPE);
        } 
        if (mValues.size() > 0) {
            addInsertOp(); 
        } 
        return this;
    } 
 
    /** 
     * Adds an email 
     *  

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: clear, put, size, withValues
    public ContactOperations updateName(Uri uri, String existingFirstName,
        String existingLastName, String firstName, String lastName) {
        Log.i("ContactOperations", "u;ef=" + existingFirstName + ";el="
            + existingLastName + ";f=" + firstName + ";l=" + lastName);
 
        mValues.clear();
        if (!TextUtils.equals(existingFirstName,firstName)) {
            mValues.put(StructuredName.GIVEN_NAME, firstName);
            mValues.put(StructuredName.MIMETYPE,
                StructuredName.CONTENT_ITEM_TYPE);
        } 
        if (!TextUtils.equals(existingLastName, lastName)) {
            mValues.put(StructuredName.FAMILY_NAME, lastName);
            mValues.put(StructuredName.MIMETYPE,
                StructuredName.CONTENT_ITEM_TYPE);
        } 
        if (mValues.size() > 0) {
            addUpdateOp(uri);
        } 
        return this;

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android ContentProviderOperation.Builder Questions & Answers:

See Code Examples for Android ContentProviderOperation.Builder Methods: