添加的英文(add contacts中文翻譯,add contacts是什么意思,add contacts發(fā)音、用法及例句)
1、add contacts
add contacts發(fā)音
英: 美:
add contacts中文意思翻譯
常見(jiàn)釋義:
添加聯(lián)系人
add contacts雙語(yǔ)使用場(chǎng)景
1、You can add contacts from your contact list to messages and then forward or send them to others.───您可以將聯(lián)系人列表中的聯(lián)系人添加到郵件中,然后將其轉發(fā)或發(fā)送給他人。
2、Be sure to print some extra copies so you’ll have enough to add contacts at the last minute or to redo cards or letters that are misaddressed or need to be redone for some reason.───要確保多印幾份,以備在最后關(guān)頭增加聯(lián)系人,或因為寫(xiě)錯地址或因某個(gè)原因須重寫(xiě)時(shí)有充足的賀卡或祝賀信。
3、Use message properties to add Contacts data───使用郵件屬性添加“聯(lián)系人”數據
4、What is more, both phones can automatically add contacts from such sites to their address books.───此外,兩家公司的手機均能從這些網(wǎng)址自動(dòng)添加聯(lián)系人到其通訊錄。
add contacts相似詞語(yǔ)短語(yǔ)
1、add information───添加信息
2、inflections add───屈折增加
3、simpler contacts───更簡(jiǎn)單的聯(lián)系人
4、close contacts───密切接觸者
5、make contacts───接觸點(diǎn);接通
6、personal contacts───身體接觸;私下交往
7、add───vi.加;增加;加起來(lái);做加法;vt.增加,添加;補充說(shuō);計算…總和;n.加法,加法運算
8、astigmatism contacts───散光接觸
9、colored contacts───彩色觸點(diǎn)
2、android手機里有預置聯(lián)系人功能嗎4.4源代碼里有自帶這個(gè)功能嗎
實(shí)現預置聯(lián)系人(包含姓名、號碼信息)至手機中;并保證該聯(lián)系人是只讀的,無(wú)法被刪除/編輯。
代碼分為兩部分:
Part One 將預置的聯(lián)系人插入到數據庫中;
Part Two 實(shí)現在聯(lián)系人詳情和聯(lián)系人多選界面中無(wú)法刪除/編輯預置聯(lián)系人。
注意如果您不需要限制預置聯(lián)系人的刪除/編輯操作,那么僅加入Part One部分代碼即可,并去掉第三步”新增函數“ 中的語(yǔ)句:contactvalues.put(RawContacts.IS_SDN_CONTACT, -1);
File:alps\packages\apps\Contacts\src\com\mediatek\contacts\simcontact\AbstractStartSIMService.java
1.引入包
import android.provider.ContactsContract.PhoneLookup;
2.增加變量
private static boolean sIsRunningNumberCheck = false;
private static final int INSERT_PRESET_NUMBER_COUNT = xxx; //預置聯(lián)系人的個(gè)數
private static final String INSERT_PRESET_NAME[] = {"xxx1","xxx2",...}; //各預置聯(lián)系人的姓名
private static final String INSERT_PRESET_NUMBER[] = {"xxx1","xxx2",...}; //各預置聯(lián)系人的號碼
3.增加函數(將預置聯(lián)系人信息寫(xiě)入數據庫中):
private void importDefaultReadonlyContact() {
new Thread(new Runnable() {
@Override
public void run() {
Log.i(TAG, "isRunningNumberCheck before: " + sIsRunningNumberCheck);
if (sIsRunningNumberCheck) {
return;
}
sIsRunningNumberCheck = true;
for(int i = 0;i < INSERT_PRESET_NUMBER_COUNT; i++)
{
Log.i(TAG, "isRunningNumberCheck after: " + sIsRunningNumberCheck);
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri
.encode(INSERT_PRESET_NUMBER[i]));
Log.i(TAG, "getContactInfoByPhoneNumbers(), uri = " + uri);
Cursor contactCursor = getContentResolver().query(uri, new String[] {
PhoneLookup.DISPLAY_NAME, PhoneLookup.PHOTO_ID
}, null, null, null);
try {
if (contactCursor != null && contactCursor.getCount() > 0) {
return;
} else {
final ArrayList perationList = new ArrayList();
ContentProviderOperation.Builder builder = ContentProviderOperation
.newInsert(RawContacts.CONTENT_URI);
ContentValues contactvalues = new ContentValues();
contactvalues.put(RawContacts.ACCOUNT_NAME,
AccountType.ACCOUNT_NAME_LOCAL_PHONE);
contactvalues.put(RawContacts.ACCOUNT_TYPE,
AccountType.ACCOUNT_TYPE_LOCAL_PHONE);
contactvalues.put(RawContacts.INDICATE_PHONE_SIM,
ContactsContract.RawContacts.INDICATE_PHONE);
contactvalues.put(RawContacts.IS_SDN_CONTACT, -1);
builder.withValues(contactvalues);
builder.withValue(RawContacts.AGGREGATION_MODE,
RawContacts.AGGREGATION_MODE_DISABLED);
operationList.add(builder.build());
builder = ContentProviderOperation.newInsert(Data.CONTENT_URI);
builder.withValueBackReference(Phone.RAW_CONTACT_ID, 0);
builder.withValue(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
builder.withValue(Phone.TYPE, Phone.TYPE_MOBILE);
builder.withValue(Phone.NUMBER, INSERT_PRESET_NUMBER[i]);
builder.withValue(Data.IS_PRIMARY, 1);
operationList.add(builder.build());
builder = ContentProviderOperation.newInsert(Data.CONTENT_URI);
builder.withValueBackReference(StructuredName.RAW_CONTACT_ID, 0);
builder.withValue(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE);
builder.withValue(StructuredName.DISPLAY_NAME, INSERT_PRESET_NAME[i]);
operationList.add(builder.build());
try {
getContentResolver().applyBatch(
ContactsContract.AUTHORITY, operationList);
} catch (RemoteException e) {
Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage()));
} catch (OperationApplicationException e) {
Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage()));
}
}
} finally {
// when this service start,but the contactsprovider has not been started yet.
// the contactCursor perhaps null, but not always.(first load will weekup the provider)
// so add null block to avoid nullpointerexception
if (contactCursor != null) {
contactCursor.close();
}
}
}//for
Log.i(TAG, "isRunningNumberCheck insert: " + sIsRunningNumberCheck);
sIsRunningNumberCheck = false;
}
}).start();
}
4.onStart中調用這個(gè)函數:
public void onStart(Intent intent, int startId) {
.....
//add by MTK---Preset Contacts
importDefaultReadonlyContact();
log("[onStart]" + intent + ", startId " + startId);
if (intent == null) {
return;
}
.....
}
Part Two
1.File:DefaultContactListAdapter.java Path:alps\packages\apps\contacts\src\com\android\contacts\list
configureSelection函數中有五處 RawContacts.IS_SDN_CONTACT + " = 0",都改為:RawContacts.IS_SDN_CONTACT + " < 1"
2.File:ProfileAndContactsLoader.java Path:alps\packages\apps\contacts\src\com\android\contacts\list
loadSDN函數中有兩處 RawContacts.IS_SDN_CONTACT + " = 0",都改為:RawContacts.IS_SDN_CONTACT + " < 1"
3. File:Contact.java Path:alps\packages\apps\contacts\src\com\android\contacts\model
增加如下函數:
//add by MTK---Preset Contacts
public boolean isReadOnlyContact() {
return mIsSdnContact == -1;
}
4. File:ContactLoaderFragment.java Path:alps\packages\apps\contacts\src\com\android\contacts\detail
將isContactEditable函數修改為:
public boolean isContactEditable() {
return mContactData != null && !mContactData.isDirectoryEntry()
&& !mContactData.isSdnContacts() && !mContactData.isReadOnlyContact() ;
}
5. File:ContactEntryListAdapter.java Path:alps\packages\apps\contacts\src\com\android\contacts\list
在文件最后增加以下代碼:
public boolean showReadOnlyContact = true;
public void setShowReadOnlyContact(boolean canDelete) {
showReadOnlyContact = canDelete;
}
6. File:ContactEntryListFragment.java Path:alps\packages\apps\contacts\src\com\android\contacts\list
引入如下包:
import com.mediatek.contacts.list.ContactsMultiDeletionFragment;
在onCreateLoader函數中,倒數第二句mAdapter.configureLoader(loader, directoryId);之前增加語(yǔ)句:
mAdapter.setShowReadOnlyContact((this instanceof ContactsMultiDeletionFragment) ? false : true);
8 7.File:MultiContactsBasePickerAdapter.java Path:alps\packages\apps\contacts\src\com\mediatek\contacts\list 在configureSelection函數最后的語(yǔ)句 loader.setSelection(selection.toString());之前增加語(yǔ)句:
if (!showReadOnlyContact ) {
selection.append(" AND " + Contacts.IS_SDN_CONTACT + "=0");
}
版權聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權,不承擔相關(guān)法律責任,不代表本網(wǎng)贊同其觀(guān)點(diǎn)和對其真實(shí)性負責。如因作品內容、版權和其它問(wèn)題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實(shí),本站將立刻刪除。