کلیدستان

نسخه‌ی کامل: تغییر شماره تماس در contacts (در برنامه نویسی اندروید)
شما در حال مشاهده نسخه آرشیو هستید. برای مشاهده نسخه کامل کلیک کنید.
سلام
من به کمک کلاس ContactsContract به شماره تماس ها دسترسی دارم و میتونم اونا رو نمایش بدم ولی مشکل اینه که با این کلاس آشنایی زیادی ندارم و تازه کارم رو باش شروع کردم و خواستم ببینم با این کلاس میشه شماره ها رو تغییر داد یا باید از کلاس و روش دیگه ای استفاده کنم ؟؟؟

لطفا کمک کنید .... ممنون
سلام این کد برای تغییر یک مخاطب :

کد پی‌اچ‌پی:
    // The Cursor that contains the Contact row
    public Cursor mCursor;
    // The index of the lookup key column in the cursor
    public int mLookupKeyIndex;
    // The index of the contact's _ID value
    public int mIdIndex;
    // The lookup key from the Cursor
    public String mCurrentLookupKey;
    // The _ID value from the Cursor
    public long mCurrentId;
    // A content URI pointing to the contact
    Uri mSelectedContactUri;
    ...
    /*
     * Once the user has selected a contact to edit,
     * this gets the contact's lookup key and _ID values from the
     * cursor and creates the necessary URI.
     */
    // Gets the lookup key column index
    mLookupKeyIndex mCursor.getColumnIndex(Contacts.LOOKUP_KEY);
    // Gets the lookup key value
    mCurrentLookupKey mCursor.getString(mLookupKeyIndex);
    // Gets the _ID column index
    mIdIndex mCursor.getColumnIndex(Contacts._ID);
    mCurrentId mCursor.getLong(mIdIndex);
    mSelectedContactUri =
            Contacts.getLookupUri(mCurrentIdmCurrentLookupKey);

    // Creates a new Intent to edit a contact
    Intent editIntent = new Intent(Intent.ACTION_EDIT);
    /*
     * Sets the contact URI to edit, and the data type that the
     * Intent must match
     */
    editIntent.setDataAndType(mSelectedContactUri,Contacts.CONTENT_ITEM_TYPE); 

منبع : http://developer.android.com/training/co...ditContact

موفق باشید
سلام ممنون
ولی این روش جالبی نیست من روشی برای آپدیت کل کنتکت ها میخوام.
با استفاده از این واسه همه ی کنتکت ها یه ایونت باز میشه که خوده یوزر باید تغییرش بده