添加的英文(add contacts中文翻譯,add contacts是什么意思,add contacts發(fā)音、用法及例句)
- 內(nèi)容導(dǎo)航:
- 1、add contacts
- 2、android手機(jī)里有預(yù)置聯(lián)系人功能嗎4.4源代碼里有自帶這個功能嗎
1、add contacts
add contacts發(fā)音
英: 美:
add contacts中文意思翻譯
常見釋義:
添加聯(lián)系人
add contacts雙語使用場景
1、You can add contacts from your contact list to messages and then forward or send them to others.───您可以將聯(lián)系人列表中的聯(lián)系人添加到郵件中,然后將其轉(zhuǎ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)系人,或因?yàn)閷戝e地址或因某個原因須重寫時有充足的賀卡或祝賀信。
3、Use message properties to add Contacts data───使用郵件屬性添加“聯(lián)系人”數(shù)據(jù)
4、What is more, both phones can automatically add contacts from such sites to their address books.───此外,兩家公司的手機(jī)均能從這些網(wǎng)址自動添加聯(lián)系人到其通訊錄。
add contacts相似詞語短語
1、add information───添加信息
2、inflections add───屈折增加
3、simpler contacts───更簡單的聯(lián)系人
4、close contacts───密切接觸者
5、make contacts───接觸點(diǎn);接通
6、personal contacts───身體接觸;私下交往
7、add───vi.加;增加;加起來;做加法;vt.增加,添加;補(bǔ)充說;計(jì)算…總和;n.加法,加法運(yùn)算
8、astigmatism contacts───散光接觸
9、colored contacts───彩色觸點(diǎn)
2、android手機(jī)里有預(yù)置聯(lián)系人功能嗎4.4源代碼里有自帶這個功能嗎
實(shí)現(xiàn)預(yù)置聯(lián)系人(包含姓名、號碼信息)至手機(jī)中;并保證該聯(lián)系人是只讀的,無法被刪除/編輯。
代碼分為兩部分:
Part One 將預(yù)置的聯(lián)系人插入到數(shù)據(jù)庫中;
Part Two 實(shí)現(xiàn)在聯(lián)系人詳情和聯(lián)系人多選界面中無法刪除/編輯預(yù)置聯(lián)系人。
注意如果您不需要限制預(yù)置聯(lián)系人的刪除/編輯操作,那么僅加入Part One部分代碼即可,并去掉第三步”新增函數(shù)“ 中的語句: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; //預(yù)置聯(lián)系人的個數(shù)
private static final String INSERT_PRESET_NAME[] = {"xxx1","xxx2",...}; //各預(yù)置聯(lián)系人的姓名
private static final String INSERT_PRESET_NUMBER[] = {"xxx1","xxx2",...}; //各預(yù)置聯(lián)系人的號碼
3.增加函數(shù)(將預(yù)置聯(lián)系人信息寫入數(shù)據(jù)庫中):
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中調(diào)用這個函數(shù):
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函數(shù)中有五處 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函數(shù)中有兩處 RawContacts.IS_SDN_CONTACT + " = 0",都改為:RawContacts.IS_SDN_CONTACT + " < 1"
3. File:Contact.java Path:alps\packages\apps\contacts\src\com\android\contacts\model
增加如下函數(shù):
//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函數(shù)修改為:
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函數(shù)中,倒數(shù)第二句mAdapter.configureLoader(loader, directoryId);之前增加語句:
mAdapter.setShowReadOnlyContact((this instanceof ContactsMultiDeletionFragment) ? false : true);
8 7.File:MultiContactsBasePickerAdapter.java Path:alps\packages\apps\contacts\src\com\mediatek\contacts\list 在configureSelection函數(shù)最后的語句 loader.setSelection(selection.toString());之前增加語句:
if (!showReadOnlyContact ) {
selection.append(" AND " + Contacts.IS_SDN_CONTACT + "=0");
}
本站其他內(nèi)容推薦
1、gaffe slope bustard unicycle agape fleck almagest alteration bro costermonger
2、Ernest中文翻譯,Ernest是什么意思,Ernest發(fā)音、用法及例句
3、good to the last drop中文翻譯,good to the last drop是什么意思,good to the last drop發(fā)音、用法及例句
4、code analysis中文翻譯,code analysis是什么意思,code analysis發(fā)音、用法及例句
5、love one another中文翻譯,love one another是什么意思,love one another發(fā)音、用法及例句
6、刻鶻類鶩,刻鵠類鶩的意思,刻鵠類鶩成語解釋,刻鵠類鶩是什么意思含義寓意
7、難舍難分的意思,難舍難分成語解釋,難舍難分是什么意思含義寓意
8、瀟瀟灑灑,灑灑瀟瀟的意思,灑灑瀟瀟成語解釋,灑灑瀟瀟是什么意思含義寓意
9、綬[ shòu ],綬字的拼音,部首,意思,組詞,成語,綬字的筆順,筆畫順序怎么寫
10、multitudes是什么意思,multitudes中文翻譯,multitudes怎么讀、發(fā)音、用法及例句
版權(quán)聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任,不代表本網(wǎng)贊同其觀點(diǎn)和對其真實(shí)性負(fù)責(zé)。如因作品內(nèi)容、版權(quán)和其它問題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實(shí),本站將立刻刪除。