+
+
+
+
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index e26d599..3a10a7a 100644
--- a/README.md
+++ b/README.md
@@ -20,10 +20,16 @@ allprojects {
#### If you use only Java.
```
dependencies {
- implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.1'
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.4'
// For extras
- implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.1'
- annotationProcessor 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.1'
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.4'
+ annotationProcessor 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.4'
+
+ // AndroidX
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.6'
+ // For extras
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.6'
+ annotationProcessor 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.6'
}
```
@@ -42,10 +48,16 @@ android {
}
dependencies {
- implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.1'
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.4'
+ // For extras
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.4'
+ kapt 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.4'
+
+ // AndroidX
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:core:1.1.5'
// For extras
- implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.1'
- kapt 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.1'
+ implementation 'com.github.Omega-R.OmegaIntentBuilder:annotations:1.1.5'
+ kapt 'com.github.Omega-R.OmegaIntentBuilder:processor:1.1.5'
}
```
diff --git a/core/src/main/java/com/omega_r/libs/omegaintentbuilder/OmegaIntentBuilder.kt b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/OmegaIntentBuilder.kt
index 099d1f9..29e89da 100644
--- a/core/src/main/java/com/omega_r/libs/omegaintentbuilder/OmegaIntentBuilder.kt
+++ b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/OmegaIntentBuilder.kt
@@ -135,4 +135,10 @@ object OmegaIntentBuilder {
@JvmStatic
fun speechToText() = SpeechToTextBuilder()
+ /**
+ * @return InsertContactIntentBuilder
+ */
+ @JvmStatic
+ fun insertContact() = InsertContactIntentBuilder()
+
}
\ No newline at end of file
diff --git a/core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders/InsertContactIntentBuilder.kt b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders/InsertContactIntentBuilder.kt
new file mode 100644
index 0000000..a2c7fa7
--- /dev/null
+++ b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders/InsertContactIntentBuilder.kt
@@ -0,0 +1,521 @@
+package com.omega_r.libs.omegaintentbuilder.builders
+
+import android.content.Context
+import android.content.Intent
+import android.provider.ContactsContract
+import android.provider.ContactsContract.Intents.Insert.*
+import com.omega_r.libs.omegaintentbuilder.types.EmailAddressType
+import com.omega_r.libs.omegaintentbuilder.types.PhoneType
+
+class InsertContactIntentBuilder : BaseActivityBuilder() {
+ private var name: String? = null
+ private var fullMode = false
+ private var phoneticName: String? = null
+ private var company: String? = null
+ private var jobTitle: String? = null
+ private var notes: String? = null
+ private var phone: String? = null
+ private var phoneType: PhoneType? = null
+ private var customPhoneType: String? = null
+ private var phoneIsPrimary: Boolean? = null
+ private var secondaryPhone: String? = null
+ private var secondaryPhoneType: PhoneType? = null
+ private var customSecondaryPhoneType: String? = null
+ private var tertiaryPhone: String? = null
+ private var tertiaryPhoneType: PhoneType? = null
+ private var customTertiaryPhoneType: String? = null
+ private var email: String? = null
+ private var emailType: EmailAddressType? = null
+ private var customEmailType: String? = null
+ private var emailIsPrimary: Boolean? = null
+ private var secondaryEmail: String? = null
+ private var secondaryEmailType: EmailAddressType? = null
+ private var customSecondaryEmailType: String? = null
+ private var tertiaryEmail: String? = null
+ private var tertiaryEmailType: EmailAddressType? = null
+ private var customTertiaryEmailType: String? = null
+ private var postal: String? = null
+ private var postalType: String? = null
+ private var postalIsPrimary: Boolean? = null
+
+ /**
+ * Set the extra field for the contact name.
+ *
+ * @param name String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun name(name: String): InsertContactIntentBuilder {
+ this.name = name
+ return this
+ }
+
+ /**
+ * If present, forces a bypass of quick insert mode.
+ *
+ * change fullMode = true
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun fullMode(): InsertContactIntentBuilder {
+ this.fullMode = true
+ return this
+ }
+
+ /**
+ * Set the field for the contact phonetic name.
+ *
+ * @param phoneticName String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun phoneticName(phoneticName: String): InsertContactIntentBuilder {
+ this.phoneticName = phoneticName
+ return this
+ }
+
+ /**
+ * Set the field for the contact company.
+ *
+ * @param company String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun company(company: String): InsertContactIntentBuilder {
+ this.company = company
+ return this
+ }
+
+ /**
+ * Set the field for the contact job title.
+ *
+ * @param jobTitle String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun jobTitle(jobTitle: String): InsertContactIntentBuilder {
+ this.jobTitle = jobTitle
+ return this
+ }
+
+ /**
+ * Set the field for the contact notes.
+ *
+ * @param notes String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun notes(notes: String): InsertContactIntentBuilder {
+ this.notes = notes
+ return this
+ }
+
+ /**
+ * Set the field for the contact phone number.
+ *
+ * @param phone String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun phone(phone: String): InsertContactIntentBuilder {
+ this.phone = phone
+ return this
+ }
+
+ /**
+ * Set the field for the contact phone number type.
+ * Type: Either an integer value from
+ * @link CommonDataKinds.Phone,
+ * or a string specifying a custom label.
+ *
+ * @param phoneType PhoneType
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun phoneType(phoneType: PhoneType): InsertContactIntentBuilder {
+ customPhoneType = null
+ this.phoneType = phoneType
+ return this
+ }
+
+ /**
+ * Set the field for the contact phone number type.
+ * Type: Either an String value to create custom type
+ *
+ * @param customPhoneType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun phoneType(customPhoneType: String): InsertContactIntentBuilder {
+ phoneType = null
+ this.customPhoneType = customPhoneType
+ return this
+ }
+
+ /**
+ * Set the field for the phone isprimary flag.
+ *
Type: boolean
+ *
+ * @param phoneIsPrimary Boolean
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun phoneIsPrimary(phoneIsPrimary: Boolean): InsertContactIntentBuilder {
+ this.phoneIsPrimary = phoneIsPrimary
+ return this
+ }
+
+ /**
+ * Set the field for the secondary contact phone number.
+ *
+ * @param secondaryPhone String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryPhone(secondaryPhone: String): InsertContactIntentBuilder {
+ this.secondaryPhone = secondaryPhone
+ return this
+ }
+
+ /**
+ * Set the field for the secondary contact phone number type.
+ * Type: Either an integer value from
+ * @link CommonDataKinds.Phone,
+ * or a string specifying a custom label.
+ *
+ * @param secondaryPhoneType PhoneType
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryPhoneType(secondaryPhoneType: PhoneType): InsertContactIntentBuilder {
+ customSecondaryPhoneType = null
+ this.secondaryPhoneType = secondaryPhoneType
+ return this
+ }
+
+ /**
+ * Set the field for the contact phone number type.
+ * Type: Either an String value to create custom type
+ *
+ * @param customSecondaryPhoneType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryPhoneType(customSecondaryPhoneType: String): InsertContactIntentBuilder {
+ secondaryPhoneType = null
+ this.customSecondaryPhoneType = customSecondaryPhoneType
+ return this
+ }
+
+ /**
+ * Set the field for the tertiary contact phone number.
+ *
+ * @param tertiaryPhone String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryPhone(tertiaryPhone: String): InsertContactIntentBuilder {
+ this.tertiaryPhone = tertiaryPhone
+ return this
+ }
+
+ /**
+ * Set the field for the tertiary contact phone number type.
+ * Type: Either an integer value from
+ * @link CommonDataKinds.Phone,
+ * or a string specifying a custom label.
+ *
+ * @param tertiaryPhoneType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryPhoneType(tertiaryPhoneType: PhoneType): InsertContactIntentBuilder {
+ customTertiaryPhoneType = null
+ this.tertiaryPhoneType = tertiaryPhoneType
+ return this
+ }
+
+ /**
+ * Set the field for the contact phone number type.
+ * Type: Either an String value to create custom type
+ *
+ * @param customTertiaryPhoneType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryPhoneType(customTertiaryPhoneType: String): InsertContactIntentBuilder {
+ tertiaryPhoneType = null
+ this.customTertiaryPhoneType = customTertiaryPhoneType
+ return this
+ }
+
+ /**
+ * Set the field for the contact email address.
+ *
+ * @param email String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun email(email: String): InsertContactIntentBuilder {
+ this.email = email
+ return this
+ }
+
+ /**
+ * Set the field for the contact email type.
+ * Type: Either an integer value from
+ * {@link CommonDataKinds.Email}
+ * or a string specifying a custom label.
+ *
+ * @param emailType EmailAddressType
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun emailType(emailType: EmailAddressType): InsertContactIntentBuilder {
+ customEmailType = null
+ this.emailType = emailType
+ return this
+ }
+
+ /**
+ * Set the field for the contact email type.
+ * Type: Either a String for custom type
+ *
+ * @param customEmailType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun emailType(customEmailType: String): InsertContactIntentBuilder {
+ emailType = null
+ this.customEmailType = customEmailType
+ return this
+ }
+
+ /**
+ * Set the field for the email isprimary flag.
+ *
+ * @param emailIsPrimary Boolean
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun emailIsPrimary(emailIsPrimary: Boolean): InsertContactIntentBuilder {
+ this.emailIsPrimary = emailIsPrimary
+ return this
+ }
+
+ /**
+ * Set the field for the contact secondary email address.
+ *
+ * @param secondaryEmail String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryEmail(secondaryEmail: String): InsertContactIntentBuilder {
+ this.secondaryEmail = secondaryEmail
+ return this
+ }
+
+ /**
+ * Set the field for the contact secondary email type.
+ * Type: Either an integer value from
+ * {@link CommonDataKinds.Email}
+ * or a string specifying a custom label.
+ *
+ * @param secondaryEmailType EmailAddressType
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryEmailType(secondaryEmailType: EmailAddressType): InsertContactIntentBuilder {
+ customSecondaryEmailType = null
+ this.secondaryEmailType = secondaryEmailType
+ return this
+ }
+
+ /**
+ * Set the field for the contact email type.
+ * Type: Either a String for custom type
+ *
+ * @param customSecondaryEmailType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun secondaryEmailType(customSecondaryEmailType: String): InsertContactIntentBuilder {
+ secondaryEmailType = null
+ this.customSecondaryEmailType = customSecondaryEmailType
+ return this
+ }
+
+ /**
+ * Set the field for the contact tertiary email address.
+ *
+ * @param tertiaryEmail String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryEmail(tertiaryEmail: String): InsertContactIntentBuilder {
+ this.tertiaryEmail = tertiaryEmail
+ return this
+ }
+
+ /**
+ * Set the field for the contact tertiary email type.
+ * Type: Either an integer value from
+ * {@link CommonDataKinds.Email}
+ * or a string specifying a custom label.
+ *
+ * @param tertiaryEmailType EmailAddressType
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryEmailType(tertiaryEmailType: EmailAddressType): InsertContactIntentBuilder {
+ customTertiaryEmailType = null
+ this.tertiaryEmailType = tertiaryEmailType
+ return this
+ }
+
+ /**
+ * Set the field for the contact email type.
+ * Type: Either a String for custom type
+ *
+ * @param customTertiaryEmailType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun tertiaryEmailType(customTertiaryEmailType: String): InsertContactIntentBuilder {
+ tertiaryEmailType = null
+ this.customTertiaryEmailType = customTertiaryEmailType
+ return this
+ }
+
+ /**
+ * Set the field for the contact postal address.
+ *
+ * @param postal String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun postal(postal: String): InsertContactIntentBuilder {
+ this.postal = postal
+ return this
+ }
+
+ /**
+ * Set the field for the contact postal address type.
+ * Type: Either an integer value from
+ *
+ * @param postalType String
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun postalType(postalType: String): InsertContactIntentBuilder {
+ this.postalType = postalType
+ return this
+ }
+
+ /**
+ * Set the extra field for the postal isprimary flag.
+ *
+ * @param postalIsPrimary Boolean
+ * @return This InsertContactIntentBuilder for method chaining
+ */
+ fun postalIsPrimary(postalIsPrimary: Boolean): InsertContactIntentBuilder {
+ this.postalIsPrimary = postalIsPrimary
+ return this
+ }
+
+ override fun createIntent(context: Context): Intent {
+ return Intent(Intent.ACTION_INSERT).apply {
+ type = ContactsContract.Contacts.CONTENT_TYPE
+
+ name?.let {
+ putExtra(NAME, it)
+ }
+
+ if (fullMode) {
+ putExtra(FULL_MODE, fullMode)
+ }
+
+ phoneticName?.let {
+ putExtra(PHONETIC_NAME, it)
+ }
+
+ company?.let {
+ putExtra(COMPANY, it)
+ }
+
+ jobTitle?.let {
+ putExtra(JOB_TITLE, it)
+ }
+
+ notes?.let {
+ putExtra(NOTES, it)
+ }
+
+ phone?.let {
+ putExtra(PHONE, it)
+ }
+
+ phoneType?.let {
+ putExtra(PHONE_TYPE, it.type)
+ } ?: run {
+ customPhoneType?.let {
+ putExtra(PHONE_TYPE, it)
+ }
+ }
+
+ phoneIsPrimary?.let {
+ putExtra(PHONE_ISPRIMARY, it)
+ }
+
+ secondaryPhone?.let {
+ putExtra(SECONDARY_PHONE, it)
+ }
+
+ secondaryPhoneType?.let {
+ putExtra(SECONDARY_PHONE_TYPE, it.type)
+ } ?: run {
+ customSecondaryPhoneType?.let {
+ putExtra(SECONDARY_PHONE_TYPE, it)
+ }
+ }
+
+ tertiaryPhone?.let {
+ putExtra(TERTIARY_PHONE, it)
+ }
+
+ tertiaryPhoneType?.let {
+ putExtra(TERTIARY_PHONE_TYPE, it.type)
+ } ?: run {
+ customTertiaryPhoneType?.let {
+ putExtra(TERTIARY_PHONE_TYPE, it)
+ }
+ }
+
+ email?.let {
+ putExtra(EMAIL, it)
+ }
+
+ emailType?.let {
+ putExtra(EMAIL_TYPE, it.type)
+ } ?: run {
+ customEmailType?.let {
+ putExtra(EMAIL_TYPE, it)
+ }
+ }
+
+ emailIsPrimary?.let {
+ putExtra(EMAIL_ISPRIMARY, it)
+ }
+
+ secondaryEmail?.let {
+ putExtra(SECONDARY_EMAIL, it)
+ }
+
+ secondaryEmailType?.let {
+ putExtra(SECONDARY_EMAIL_TYPE, it.type)
+ } ?: run {
+ customSecondaryEmailType?.let {
+ putExtra(SECONDARY_EMAIL_TYPE, it)
+ }
+ }
+
+ tertiaryEmail?.let {
+ putExtra(TERTIARY_EMAIL, it)
+ }
+
+ tertiaryEmailType?.let {
+ putExtra(TERTIARY_EMAIL_TYPE, it.type)
+ } ?: run {
+ customTertiaryEmailType?.let {
+ putExtra(TERTIARY_EMAIL_TYPE, it)
+ }
+ }
+
+ postal?.let {
+ putExtra(POSTAL, it)
+ }
+
+ postalType?.let {
+ putExtra(POSTAL_TYPE, it)
+ }
+
+ postalIsPrimary?.let {
+ putExtra(POSTAL_ISPRIMARY, it)
+ }
+
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/EmailAddressType.kt b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/EmailAddressType.kt
new file mode 100644
index 0000000..61b366d
--- /dev/null
+++ b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/EmailAddressType.kt
@@ -0,0 +1,10 @@
+package com.omega_r.libs.omegaintentbuilder.types
+
+import android.provider.ContactsContract
+
+enum class EmailAddressType(val type: Int) {
+ TYPE_HOME(ContactsContract.CommonDataKinds.Email.TYPE_HOME),
+ TYPE_WORK(ContactsContract.CommonDataKinds.Email.TYPE_WORK),
+ TYPE_OTHER(ContactsContract.CommonDataKinds.Email.TYPE_OTHER),
+ TYPE_MOBILE(ContactsContract.CommonDataKinds.Email.TYPE_MOBILE)
+}
\ No newline at end of file
diff --git a/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/PhoneType.kt b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/PhoneType.kt
new file mode 100644
index 0000000..663d938
--- /dev/null
+++ b/core/src/main/java/com/omega_r/libs/omegaintentbuilder/types/PhoneType.kt
@@ -0,0 +1,20 @@
+package com.omega_r.libs.omegaintentbuilder.types
+
+import android.provider.ContactsContract
+
+enum class PhoneType(val type: Int) {
+ TYPE_HOME(ContactsContract.CommonDataKinds.Phone.TYPE_HOME),
+ TYPE_ISDN(ContactsContract.CommonDataKinds.Phone.TYPE_ISDN),
+ TYPE_MAIN(ContactsContract.CommonDataKinds.Phone.TYPE_MAIN),
+ TYPE_MMS(ContactsContract.CommonDataKinds.Phone.TYPE_MMS),
+ TYPE_MOBILE(ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE),
+ TYPE_OTHER(ContactsContract.CommonDataKinds.Phone.TYPE_OTHER),
+ TYPE_OTHER_FAX(ContactsContract.CommonDataKinds.Phone.TYPE_OTHER_FAX),
+ TYPE_PAGER(ContactsContract.CommonDataKinds.Phone.TYPE_PAGER),
+ TYPE_RADIO(ContactsContract.CommonDataKinds.Phone.TYPE_RADIO),
+ TYPE_TELEX(ContactsContract.CommonDataKinds.Phone.TYPE_TELEX),
+ TYPE_TTY_TDD(ContactsContract.CommonDataKinds.Phone.TYPE_TTY_TDD),
+ TYPE_WORK(ContactsContract.CommonDataKinds.Phone.TYPE_WORK),
+ TYPE_WORK_MOBILE(ContactsContract.CommonDataKinds.Phone.TYPE_WORK_MOBILE),
+ TYPE_WORK_PAGER(ContactsContract.CommonDataKinds.Phone.TYPE_WORK_PAGER)
+}
\ No newline at end of file
diff --git a/examples/src/main/java/com/omega_r/omegaintentbuilder/MainActivity.java b/examples/src/main/java/com/omega_r/omegaintentbuilder/MainActivity.java
index 677a545..a2a4b4d 100644
--- a/examples/src/main/java/com/omega_r/omegaintentbuilder/MainActivity.java
+++ b/examples/src/main/java/com/omega_r/omegaintentbuilder/MainActivity.java
@@ -7,7 +7,9 @@
import com.omega_r.libs.omegaintentbuilder.OmegaIntentBuilder;
import com.omega_r.libs.omegaintentbuilder.handlers.FailCallback;
import com.omega_r.libs.omegaintentbuilder.types.CalendarActionTypes;
+import com.omega_r.libs.omegaintentbuilder.types.EmailAddressType;
import com.omega_r.libs.omegaintentbuilder.types.MapTypes;
+import com.omega_r.libs.omegaintentbuilder.types.PhoneType;
import org.jetbrains.annotations.NotNull;
@@ -38,6 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
findViewById(R.id.button_speech_to_text).setOnClickListener(this);
findViewById(R.id.button_service_extra).setOnClickListener(this);
findViewById(R.id.button_fragment_extra).setOnClickListener(this);
+ findViewById(R.id.button_insert_contact).setOnClickListener(this);
}
@Override
@@ -91,6 +94,9 @@ public void onClick(View v) {
case R.id.button_fragment_extra:
onExtrasToFragmentClicked();
break;
+ case R.id.button_insert_contact:
+ onInsertContactClicked();
+ break;
}
}
@@ -240,4 +246,34 @@ private void onExtrasToFragmentClicked() {
// .startActivity();
}
+ private void onInsertContactClicked() {
+ OmegaIntentBuilder
+ .insertContact()
+ .name("John")
+ .fullMode()
+ .phoneticName("phoneticName")
+ .company("company")
+ .jobTitle("jobTitle")
+ .notes("notes")
+ .phone("88000000008")
+ .phoneType(PhoneType.TYPE_HOME)
+ .phoneIsPrimary(true)
+ .secondaryPhone("88000001008")
+ .secondaryPhoneType("YOUR_CUSTOM_TYPE")
+ .tertiaryPhone("888888888")
+ .tertiaryPhoneType(PhoneType.TYPE_WORK_MOBILE)
+ .email("develop@omega-r.com")
+ .emailType(EmailAddressType.TYPE_HOME)
+ .emailIsPrimary(false)
+ .secondaryEmail("secondaryEmail")
+ .secondaryEmailType(EmailAddressType.TYPE_WORK)
+ .tertiaryEmail("tertiaryEmail")
+ .tertiaryEmailType("YOUR_CUSTOM_EMAIL_TYPE")
+ .postal("postal")
+ .postalType("Home")
+ .postalIsPrimary(true)
+ .createIntentHandler(this)
+ .startActivity();
+ }
+
}
diff --git a/examples/src/main/res/layout/activity_main.xml b/examples/src/main/res/layout/activity_main.xml
index bced2b2..de0d475 100644
--- a/examples/src/main/res/layout/activity_main.xml
+++ b/examples/src/main/res/layout/activity_main.xml
@@ -139,6 +139,13 @@
android:theme="@style/ButtonStyle"
android:text="@string/fragment_extra"/>
+
+
\ No newline at end of file
diff --git a/examples/src/main/res/values/strings.xml b/examples/src/main/res/values/strings.xml
index b85d9b8..5a24fa2 100644
--- a/examples/src/main/res/values/strings.xml
+++ b/examples/src/main/res/values/strings.xml
@@ -21,4 +21,5 @@
Extras to Service
TabActivity
Extras to Fragment
+ Insert Contact