1. Insert the phone into the normal SIM card
2. Log in to the mailbox and add the email address to the SIM card;
3. Found email address not added, only added name or phone number
This is the Google default behavior, when saved, the security check, found that there are illegal fields will automatically filter out the field.
For SIM cards, the email field is not supported, so the field is filtered out.
If you do not want this behavior, you want to modify the contents of the saved content in the email field, do not display the SIM account, can be modified as follows.
There are altogether 3 files that need to be modified:
1. Com.android.contacts.editor.ContactEditorFragment
Find Intent Intent = new Intent (Mcontext, contacteditoraccountschangedactivity.class);
Add a line below it: Intent.putextra ("Data", Mintentextras);
2.com.android.contacts.activities.contacteditoraccountschangedactivity
Find Maccountlistadapter = new Accountslistadapter (this, accountlistfilter.accounts_contact_writable);
Add a line below it: Maccountlistadapter.filteraccountwithbundle (Getintent (). Getbundleextra ("Data"));
3.com.android.contacts.util.accountslistadapter
Add this method to the file:
public void Filteraccountwithbundle (bundle bundle) {
if (bundle = = null) {
Return
}
String email = bundle.getstring ("email");
if (! Textutils.isempty (email)) {
int count = GetCount ();
for (int i = count-1; I >= 0; i--) {
if (Maccounts.get (i). Type.equals ("SIM account")) {
Maccounts.remove (i);
}
}
}
}
Android Save email address to contact person, email address missing problem