Use `sendEmailIntent` from commons
This commit is contained in:
parent
202282657a
commit
293522d4b1
|
@ -63,7 +63,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:f6ddbdf19b'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:141660c8f9'
|
||||
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.simplemobiletools.commons.extensions.*
|
|||
import com.simplemobiletools.commons.helpers.letterBackgroundColors
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.contacts.pro.R
|
||||
import com.simplemobiletools.contacts.pro.extensions.sendEmailIntent
|
||||
import com.simplemobiletools.contacts.pro.extensions.shareContacts
|
||||
import com.simplemobiletools.contacts.pro.helpers.ContactsHelper
|
||||
import com.simplemobiletools.contacts.pro.models.Contact
|
||||
|
|
|
@ -11,7 +11,9 @@ import android.os.Looper
|
|||
import android.provider.ContactsContract
|
||||
import androidx.core.content.FileProvider
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
|
||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CONTACTS
|
||||
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
|
||||
import com.simplemobiletools.contacts.pro.BuildConfig
|
||||
import com.simplemobiletools.contacts.pro.R
|
||||
import com.simplemobiletools.contacts.pro.databases.ContactsDatabase
|
||||
|
@ -40,13 +42,6 @@ fun Context.getEmptyContact(): Contact {
|
|||
)
|
||||
}
|
||||
|
||||
fun Context.sendEmailIntent(recipient: String) {
|
||||
Intent(Intent.ACTION_SENDTO).apply {
|
||||
data = Uri.fromParts(KEY_MAILTO, recipient, null)
|
||||
launchActivityIntent(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.sendAddressIntent(address: String) {
|
||||
val location = Uri.encode(address)
|
||||
val uri = Uri.parse("geo:0,0?q=$location")
|
||||
|
|
Loading…
Reference in New Issue