public void openContactForm(ReadableMap contact, Promise promise) {

        String givenName = contact.hasKey("givenName") ? contact.getString("givenName") : null;
        String middleName = contact.hasKey("middleName") ? contact.getString("middleName") : null;
        String displayName = contact.hasKey("displayName") ? contact.getString("displayName") : null;
        String familyName = contact.hasKey("familyName") ? contact.getString("familyName") : null;
        String prefix = contact.hasKey("prefix") ? contact.getString("prefix") : null;
        String suffix = contact.hasKey("suffix") ? contact.getString("suffix") : null;
        String company = contact.hasKey("company") ? contact.getString("company") : null;
        String jobTitle = contact.hasKey("jobTitle") ? contact.getString("jobTitle") : null;
        String department = contact.hasKey("department") ? contact.getString("department") : null;
        String note = contact.hasKey("note") ? contact.getString("note") : null;
        String thumbnailPath = contact.hasKey("thumbnailPath") ? contact.getString("thumbnailPath") : null;

        ReadableArray phoneNumbers = contact.hasKey("phoneNumbers") ? contact.getArray("phoneNumbers") : null;
        int numOfPhones = 0;
        String[] phones = null;
        String[] phonesLabels = null;
        Integer[] phonesLabelsTypes = null;
        if (phoneNumbers != null) {
            numOfPhones = phoneNumbers.size();
            phones = new String[numOfPhones];
            phonesLabels = new String[numOfPhones];
            phonesLabelsTypes = 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] = label;
                phonesLabelsTypes[i] = mapStringToPhoneType(label);
            }
        }

        ReadableArray urlAddresses = contact.hasKey("urlAddresses") ? contact.getArray("urlAddresses") : null;
        int numOfUrls = 0;
        String[] urls = null;
        if (urlAddresses != null) {
            numOfUrls = urlAddresses.size();
            urls = new String[numOfUrls];
            for (int i = 0; i < numOfUrls; i++) {
                urls[i] = urlAddresses.getMap(i).getString("url");
            }
        }

        ReadableArray emailAddresses = contact.hasKey("emailAddresses") ? contact.getArray("emailAddresses") : null;
        int numOfEmails = 0;
        String[] emails = null;
        Integer[] emailsLabels = null;
        if (emailAddresses != null) {
            numOfEmails = emailAddresses.size();
            emails = new String[numOfEmails];
            emailsLabels = new Integer[numOfEmails];
            for (int i = 0; i < numOfEmails; i++) {
                emails[i] = emailAddresses.getMap(i).getString("email");
                String label = emailAddresses.getMap(i).getString("label");
                emailsLabels[i] = mapStringToEmailType(label);
            }
        }

        ReadableArray postalAddresses = contact.hasKey("postalAddresses") ? contact.getArray("postalAddresses") : null;
        int numOfPostalAddresses = 0;
        String[] postalAddressesStreet = null;
        String[] postalAddressesCity = null;
        String[] postalAddressesState = null;
        String[] postalAddressesRegion = null;
        String[] postalAddressesPostCode = null;
        String[] postalAddressesCountry = null;
        String[] postalAddressesFormattedAddress = null;
        String[] postalAddressesLabel = null;
        Integer[] postalAddressesType = null;

        if (postalAddresses != null) {
            numOfPostalAddresses = postalAddresses.size();
            postalAddressesStreet = new String[numOfPostalAddresses];
            postalAddressesCity = new String[numOfPostalAddresses];
            postalAddressesState = new String[numOfPostalAddresses];
            postalAddressesRegion = new String[numOfPostalAddresses];
            postalAddressesPostCode = new String[numOfPostalAddresses];
            postalAddressesCountry = new String[numOfPostalAddresses];
            postalAddressesFormattedAddress = new String[numOfPostalAddresses];
            postalAddressesLabel = new String[numOfPostalAddresses];
            postalAddressesType = new Integer[numOfPostalAddresses];
            for (int i = 0; i < numOfPostalAddresses; i++) {
                postalAddressesStreet[i] = postalAddresses.getMap(i).getString("street");
                postalAddressesCity[i] = postalAddresses.getMap(i).getString("city");
                postalAddressesState[i] = postalAddresses.getMap(i).getString("state");
                postalAddressesRegion[i] = postalAddresses.getMap(i).getString("region");
                postalAddressesPostCode[i] = postalAddresses.getMap(i).getString("postCode");
                postalAddressesCountry[i] = postalAddresses.getMap(i).getString("country");
                postalAddressesFormattedAddress[i] = postalAddresses.getMap(i).getString("formattedAddress");
                postalAddressesLabel[i] = postalAddresses.getMap(i).getString("label");
                postalAddressesType[i] = mapStringToPostalAddressType(postalAddresses.getMap(i).getString("label"));
            }
        }

        ReadableArray imAddresses = contact.hasKey("imAddresses") ? contact.getArray("imAddresses") : null;
        int numOfIMAddresses = 0;
        String[] imAccounts = null;
        String[] imProtocols = null;
        if (imAddresses != null) {
            numOfIMAddresses = imAddresses.size();
            imAccounts = new String[numOfIMAddresses];
            imProtocols = new String[numOfIMAddresses];
            for (int i = 0; i < numOfIMAddresses; i++) {
                imAccounts[i] = imAddresses.getMap(i).getString("username");
                imProtocols[i] = imAddresses.getMap(i).getString("service");
            }
        }

        ArrayList<ContentValues> contactData = new ArrayList<>();

        ContentValues name = new ContentValues();
        name.put(ContactsContract.Contacts.Data.MIMETYPE, ContactsContract.CommonDataKinds.Identity.CONTENT_ITEM_TYPE);
        name.put(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, givenName);
        name.put(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, familyName);
        name.put(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME, middleName);
        name.put(ContactsContract.CommonDataKinds.StructuredName.PREFIX, prefix);
        name.put(ContactsContract.CommonDataKinds.StructuredName.SUFFIX, suffix);
        contactData.add(name);

        ContentValues organization = new ContentValues();
        organization.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE);
        organization.put(ContactsContract.CommonDataKinds.Organization.COMPANY, company);
        organization.put(ContactsContract.CommonDataKinds.Organization.TITLE, jobTitle);
        organization.put(ContactsContract.CommonDataKinds.Organization.DEPARTMENT, department);
        contactData.add(organization);

        for (int i = 0; i < numOfUrls; i++) {
            ContentValues url = new ContentValues();
            url.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE);
            url.put(ContactsContract.CommonDataKinds.Website.URL, urls[i]);
            contactData.add(url);
        }

        for (int i = 0; i < numOfEmails; i++) {
            ContentValues email = new ContentValues();
            email.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE);
            email.put(ContactsContract.CommonDataKinds.Email.TYPE, emailsLabels[i]);
            email.put(ContactsContract.CommonDataKinds.Email.ADDRESS, emails[i]);
            contactData.add(email);
        }

        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, phonesLabelsTypes[i]);
            phone.put(ContactsContract.CommonDataKinds.Phone.LABEL, phonesLabels[i]);
            phone.put(ContactsContract.CommonDataKinds.Phone.NUMBER, phones[i]);

            contactData.add(phone);
        }

        for (int i = 0; i < numOfPostalAddresses; i++) {
            ContentValues structuredPostal = new ContentValues();
            structuredPostal.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.STREET, postalAddressesStreet[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.CITY, postalAddressesCity[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.REGION, postalAddressesRegion[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.COUNTRY, postalAddressesCountry[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.POSTCODE, postalAddressesPostCode[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS,
                    postalAddressesFormattedAddress[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.LABEL, postalAddressesLabel[i]);
            structuredPostal.put(ContactsContract.CommonDataKinds.StructuredPostal.TYPE, postalAddressesType[i]);
            // No state column in StructuredPostal
            // structuredPostal.put(CommonDataKinds.StructuredPostal.???,
            // postalAddressesState[i]);
            contactData.add(structuredPostal);
        }

        for (int i = 0; i < numOfIMAddresses; i++) {
            ContentValues imAddress = new ContentValues();
            imAddress.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE);
            imAddress.put(ContactsContract.CommonDataKinds.Im.DATA, imAccounts[i]);
            imAddress.put(ContactsContract.CommonDataKinds.Im.TYPE, ContactsContract.CommonDataKinds.Im.TYPE_HOME);
            imAddress.put(ContactsContract.CommonDataKinds.Im.PROTOCOL, ContactsContract.CommonDataKinds.Im.PROTOCOL_CUSTOM);
            imAddress.put(ContactsContract.CommonDataKinds.Im.CUSTOM_PROTOCOL, imProtocols[i]);
            contactData.add(imAddress);
        }

        if (note != null) {
            ContentValues structuredNote = new ContentValues();
            structuredNote.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE);
            structuredNote.put(ContactsContract.CommonDataKinds.Note.NOTE, note);
            contactData.add(structuredNote);
        }

        if (thumbnailPath != null && !thumbnailPath.isEmpty()) {
            Bitmap photo = getThumbnailBitmap(thumbnailPath);

            if (photo != null) {
                ContentValues thumbnail = new ContentValues();
                thumbnail.put(ContactsContract.Data.RAW_CONTACT_ID, 0);
                thumbnail.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
                thumbnail.put(ContactsContract.CommonDataKinds.Photo.PHOTO, toByteArray(photo));
                thumbnail.put(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
                contactData.add(thumbnail);
            }
        }

        Intent intent = new Intent(Intent.ACTION_INSERT, ContactsContract.Contacts.CONTENT_URI);
        intent.putExtra(ContactsContract.Intents.Insert.NAME, displayName);
        intent.putExtra("finishActivityOnSaveCompleted", true);
        intent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, contactData);

        updateContactPromise = promise;
        getReactApplicationContext().startActivityForResult(intent, REQUEST_OPEN_CONTACT_FORM, Bundle.EMPTY);
    }
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