- Best 6 Ways to Transfer Contacts Android to Android
- Part 1. How to Transfer Contacts from Android to Android with One Click
- MobileTrans — Phone Transfer
- Part 2. How to transfer contacts from Android to Android with a SIM card
- Part 3. How to Transfer Contacts from Android to Android via a VCF file
- Part 4. How to Transfer Contacts from Android to Android with Google Account and Sync
- Part 5. How to Transfer Contacts from Android to Android with SHAREit
- Part 6. How to Transfer Contacts from Android to Android via Bluetooth
- Основы Contacts API в Android
- Введение
- Структура данных
- Работаем с контактами
Best 6 Ways to Transfer Contacts Android to Android
“I use more than one Android phone. How could I transfer contacts from one to another and merge both contacts?”
If you use more than one android device, perhaps one for business and another for personal purposes, you may find that sometimes the contacts on these devices can overlap. In this case, you may need to transfer contacts from one Android device to another.
In this article, we will be looking at some of the most effective solutions, beginning with the easiest and the most effective solution.
Part 1. How to Transfer Contacts from Android to Android with One Click
One of the best ways to transfer contacts from Android to Android is to use a third-party application known as MobileTrans — Phone Transfer. It is one of the best ways to transfer data from one phone to another, but you can also use it to transfer data selectively. That means that you will be able to choose the contacts you want to transfer, which can come in handy if you need to move just some of your contacts and not all of them.
MobileTrans — Phone Transfer
Transfer Contacts from Android to Android with One Click
- Easily transfer contacts, music, messages, notes, apps, photos, videos, and more.
- No iTunes, iCloud needed. Easy to operate and fast transfer speed.
- Fully compatible with iOS 14 and Android 10.0
- Transfer data to a new android phone without resetting.
To use MobileTrans to transfer contacts from Android to Android, follow these steps:
- Download and install MobileTrans on your computer. After successful installation, launch the program and then select the “Phone Transfer” feature on the main window.
Now, connect both Android devices to the computer using USB cables and make sure that MobileTrans can recognize both devices (You may have to enable USB debugging for the program to detect the devices).
It is also important to make sure that you have the order of devices correctly. Ensure that the device you want to transfer contacts from is the “Source” device, and the one you want to transfer contacts to is the “Destination”. If this order is not correct, click on “Flip” to change it.
Once the devices are both connected, and MobileTrans can detect them, you should see a list of all the data on the source device displayed between the two devices. Select “Contacts” and then click “Start” to transfer the contacts from the source device to the destination device.
Please note that if you want to replace the contacts on the destination device completely, check “Clear data before copy” before beginning the transfer process.
If you want to learn the six methods quickly, you can go through the video below:
Part 2. How to transfer contacts from Android to Android with a SIM card
If the SIM card you have on your device is removable, you can easily use it to transfer contacts to a new device by simply copying all the contacts to the SIM card, inserting it into the other device, and moving the stored contacts. Here’s a simple step by step guide to help you do that;
- Open the “Contacts” app on the source Android device and then tap on “Menu” (the three vertical dots at the top)
- Select “Manage Contacts” from the options that appear and then tap “Import/Export Contacts”.
- Tap “Export Contacts” and then select to a SIM card
- When all the contacts on the device have been transferred to the SIM card, remove the SIM card and then insert it into the destination device
- Open the Contacts app on the destination device and go to «Menu > Manage Contacts > Import/Export Contacts» and then select “Import from SIM Card.”
- Keep the devices connected to the computer until all the contacts are transferred.
- You will be able to see the transferred contacts on the destination device in a few minutes.
Part 3. How to Transfer Contacts from Android to Android via a VCF file
If your SIM card is not removable or you have too many contacts on your Android device to justify transferring them one by one, you can easily move them from one Android device to another via a VCF file. This process is particularly useful since you can transfer all your contacts at once as an email attachment. Follow these simple steps to transfer contacts from Android to Android using a VCF file;
- Open the “Contacts” app on your Android phone and then tap on the three dots at the top (menu). Select “Manage Contacts” to continue.
Please note that these buttons may be different on some Android models.
Part 4. How to Transfer Contacts from Android to Android with Google Account and Sync
You might also be able to transfer contacts from Android to Android by syncing the contacts from a Google backup. The following are simple steps to show you how to do that;
- If you haven’t already, the first thing you need to do is add a Google account to the source device. To do that, go to Settings > Accounts > Add account and select Google. Sign in to your Google account to add the account.
- Now sync the contacts to this Google account. To do that, go to Settings > Accounts > Google and then enable “Sync Contacts”.
- On the destination device, add the same Google account and then go to Settings > Account >Google and then select “Contacts” from the Google Backups list. Tap on “Sync Now” and the contacts will be transferred to the destination device.
Part 5. How to Transfer Contacts from Android to Android with SHAREit
If you don’t want to use Google sync to transfer contacts from one Android device to another, you may want to use an app like SHAREit. When installed on both devices, this app allows users to share contacts between the two devices easily. Here’s how to use it;
- Begin by installing the SHAREit app on both devices from the Google Play Store
- On the source device, open the contacts app and then select the apps you want to transfer to the destination device.
- When the contacts are selected, tap on the “Share” icon, and then choose “SHAREit” as the method to share.
- Now open “SHAREit” on the destination device and ensure that both devices are on the same Wi-Fi network. The SHAREit app on the source device will scan the target device. When the name of the destination device appears, tap on it to begin the transfer process.
Part 6. How to Transfer Contacts from Android to Android via Bluetooth
Of course, you can also choose to transfer contacts from Android to Android using Bluetooth. This solution is simple, as all you have to do is connect both devices via Bluetooth. Here’s how you can transfer your contacts from the one device to another using Bluetooth;
- On the Source device, open the contacts app and tap on Menu (three dots) > Share icon. Please note that these steps may be different on different devices.
- Tap on “Import/Export” and then select “Share name card via” before selecting the contacts you would like to transfer. If you want to transfer all of them, simply check “Select All”.
- This will open the sharing options. Select “Bluetooth”, you will be prompted to enable “Bluetooth” if you haven’t already. Ensure that Bluetooth is enabled on both devices.
- Allow Bluetooth to scan for nearby devices and select the destination device when it appears. When the devices are paired successfully, the transfer process should begin immediately.
The solutions above are the most effective ways to transfer contacts from Android to Android. Select a solution that is as easy to implement as it is valid and then follow the instructions laid out above to apply it. If you have any questions, don’t hesitate to ask and we’ll do our best to help.
Источник
Основы Contacts API в Android
Введение
Начиная с версии 5 API Android SDK интерфейс работы с контактами изменился, а основной контент провайдер Contacts и все его составляющие получили черную метку @Deprecated. Теперь за работу с контактами отвечает провайдер ContactsContract. Эти изменения связаны с изменением структуры хранения контактов, более адаптированной для Android устройств, которым требуется хранить контакты из множества разных источников и предоставлять их пользователю как единую сущность. Ведь сегодня, определенный контакт на нашем мобильном устройстве это не только имя и номер телефона, мы можем захотеть сохранить eMail, Im, Twitter, Facebook аккаунт определенного человека, и при этом, мы не хотим чтобы у нас нас появилось миллион непонятных записей. Поэтому новый Contacts API позволяет Android агрегировать похожие контакты и представлять их пользователю в одной записи, а также связывать контакт с разного рода данными.
Структура данных
На устройстве основная информация о контактах хранится в трех таблицах, на деле их там конечно больше, но мы рассмотрим основные три: contacts, raw_contacts и data. Чтобы было более наглядно я набросал простую схему в Dia.
В таблице contacts хранятся агрегированные контакты, каждая запись в этой таблице представляет собой пользовательский контакт (единую сущность) – объединение одного или нескольких сырых (необработанных) контактов из таблицы raw_contacts. Как видно на схеме, связь между этими таблицами один ко многим (1-N). Одна запись в таблице raw_contacts представляет собой так называемый сырой контакт. Сырой контакт, на языке Android, означает какой-то конкретный набор данных для определенного контакта. Но сами основные данные в этой таблице не хранятся, они хранятся в таблице data, и связь между raw_contacts и data также один ко многим. В таблице data хранятся непосредственно данные. Причем каждая строка этой таблицы это набор данных определенного типа для контакта. Какого именно типа данные хранятся в строке определяется столбцом mimetype_id, в котором содержится id типов данных определенных в таблице mimetype(например vnd.android.cursor.item/name, vnd.android.cursor.item/photo). Теперь разберемся во всем по подробней и с примерами.
Работаем с контактами
Хорошо, допустим мы хотим добавить контакт (Robert Smith, моб.тел. 11-22-33), как нам это сделать? В таблицу contacts мы сами, явно, не можем добавить контакт, так как система сама формирует эту таблицу агрегируя похожие raw_contacts. Идентичность контактов система определяет в основном по имени (одинаковые имена, фамилии и т.п.), но и по другим критериям, каким именно и как ими управлять можно посмотреть в документации. То есть, если мы добавим raw_contact нашего Роберта (Robert Smith) и свяжем его с данными типа vnd.cursor.android.item/phone, а потом у нас появится “похожий”, для системы, Robert Smith связанный с данными типа vnd.cursor.android.item/email и еще один с данными типа vnd.cursor.android.item/photo, то у нас в контактах будет один Robert Smith с фотографией, мобильным и email’ом.
Теперь попробуем переложить это на код. За таблицы и их поля отвечает, как я уже говорил, класс ContactsContract и его внутренние классы и интерфейсы. Например интерфейсом к таблице raw_contacts является класс ContactsContract.RawContacts, а за таблицу data класс ContactsContract.Data. Будьте внимательны когда изучаете их константы – интерфейсы к столбцам – обращайте внимание на метки read/write и read only.
Из написанного выше следует, что для начала, мы должны добавить сырой контакт, а потом связывать его с данными. Добавить пустой контакт можно так:
В контактах у вас должен появиться пустой (Unknown) контакт, ни с чем не связанный. Добавим ему имя. Чтобы это сделать, мы должны связать наш новый контакт с новыми данными используя его id, который можно достать из прошлого запроса. Основные интерфейсы к полям таблицы данных содержаться в классе-контейнере ContactsContract.CommonDataKinds и его внутренних классах и интерфейсах. Например, сейчас нам понадобиться
класс ContactsContract.CommonDataKinds.StrucruredName содержащий нужные нам константы для добавления имени, а также константу MIME типа, которой мы пометим наше поле в таблице данных.
Если мы добавим контакт таким образом, то в списке контактов у нас появиться Robert Smith. Теперь идем дальше, добавим нашему контакту еще и телефон. Для этого нам понадобиться класс ContactsContract.CommonDataKinds.Phone, который является интерфейсом к данным телефонного номера.
Теперь в контактах у нас есть Robert Smith которому можно позвонить. Но вот так добавлять контакт и данные к нему, в несколько запросов, дорого и накладно. Поэтому существует класс ContentProviderOperation, который позволяет построить запрос, который выполнит все наши операции за одну транзакцию. Именно им и рекомендуют пользоваться. Вот так можно добавить нашего Роберта используя ContentProviderOperation.
Вот таким образом в Android можно добавлять контакты. Будьте осторожны используя ContentProviderOperation, так как слишком большой запрос может долго выполняться. Вообще все операции лучше производить в отдельном потоке, потому, что у пользователя, например, может быть слабый телефон и много контактов.
В остальном все другие операции выполняются обычным образом, используя те провайдеры, которые вам необходимы, с некоторыми оговорками. Например, удаление контакта из таблицы contacts удалит все raw_contacts с ним связанные и т.д.
Вот так можно попробовать найти нашего Роберта в контактах:
На этом хотелось бы завершить статью, все же это были только основные сведения о Contacts API в Andoid. Я надеюсь мне удалось описать здесь основные принципы, а вся конкретика зависит от того, что вам необходимо сделать в процессе работы. Можно просто руководствоваться этими принципами и находить в официальной документации интерфейсы которые вам нужны для работы. Успехов!
Источник