fix #38, properly handle the VIEW third party intent
This commit is contained in:
parent
8dd3fc561f
commit
4dcd17fe1f
2 changed files with 3 additions and 1 deletions
|
|
@ -95,9 +95,10 @@ class NewConversationActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun isThirdPartyIntent(): Boolean {
|
||||
if (intent.action == Intent.ACTION_SENDTO && intent.dataString != null) {
|
||||
if ((intent.action == Intent.ACTION_SENDTO || intent.action == Intent.ACTION_SEND || intent.action == Intent.ACTION_VIEW) && intent.dataString != null) {
|
||||
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").trim()
|
||||
launchThreadActivity(URLDecoder.decode(number), "")
|
||||
finish()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue