public void editExistingContact(ReadableMap contact, Promise promise) {

        String recordID = contact.hasKey("recordID") ? contact.getString("recordID") : null;

        try {
            Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, recordID);

            ReadableArray phoneNumbers = contact.hasKey("phoneNumbers") ? contact.getArray("phoneNumbers") : null;
            int numOfPhones = 0;
            String[] phones = null;
            Integer[] phonesLabels = null;
            if (phoneNumbers != null) {
                numOfPhones = phoneNumbers.size();
                phones = new String[numOfPhones];
                phonesLabels = new Integer[numOfPhones];
                for (int i = 0; i < numOfPhones; i++) {
                    phones[i] = phoneNumbers.getMap(i).getString("number");
                    String label = phoneNumbers.getMap(i).getString("label");
                    phonesLabels[i] = mapStringToPhoneType(label);
                }
            }

            ArrayList<ContentValues> contactData = new ArrayList<>();
            for (int i = 0; i < numOfPhones; i++) {
                ContentValues phone = new ContentValues();
                phone.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);
                phone.put(ContactsContract.CommonDataKinds.Phone.TYPE, phonesLabels[i]);
                phone.put(ContactsContract.CommonDataKinds.Phone.NUMBER, phones[i]);
                contactData.add(phone);
            }

            Intent intent = new Intent(Intent.ACTION_EDIT);
            intent.setDataAndType(uri, ContactsContract.Contacts.CONTENT_ITEM_TYPE);
            intent.putExtra("finishActivityOnSaveCompleted", true);
            intent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, contactData);

            updateContactPromise = promise;
            getReactApplicationContext().startActivityForResult(intent, REQUEST_OPEN_EXISTING_CONTACT, Bundle.EMPTY);

        } catch (Exception e) {
            promise.reject(e.toString());
        }
    }
Retrieves <code>contact</code> for contact, or <code>null</code> if not
available.

@param contactId contact identifier, <code>recordID</code>
android/src/main/java/com/rt2zz/reactnativecontacts/impl/ContactsManagerImpl.java