decode the received number at third party intents

This commit is contained in:
tibbi 2020-04-27 22:30:33 +02:00
parent 3b5b5767f0
commit 502f68d7fa
5 changed files with 6 additions and 5 deletions

View File

@ -56,7 +56,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.26.5'
implementation 'com.simplemobiletools:commons:5.26.27'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.klinkerapps:android-smsmms:5.2.6'

View File

@ -16,6 +16,7 @@ import com.simplemobiletools.smsmessenger.helpers.*
import com.simplemobiletools.smsmessenger.models.Contact
import kotlinx.android.synthetic.main.activity_conversation.*
import kotlinx.android.synthetic.main.item_suggested_contact.view.*
import java.net.URLDecoder
import java.util.*
import kotlin.collections.ArrayList
@ -91,7 +92,7 @@ class NewConversationActivity : SimpleActivity() {
private fun isThirdPartyIntent(): Boolean {
if (intent.action == Intent.ACTION_SENDTO && intent.dataString != null) {
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").trim()
launchThreadActivity(number, "")
launchThreadActivity(URLDecoder.decode(number), "")
return true
}
return false

View File

@ -44,7 +44,7 @@
android:layout_alignBottom="@+id/thread_mesage_attachments_holder"
android:layout_marginStart="@dimen/medium_margin"
android:layout_marginBottom="@dimen/activity_margin"
android:src="@drawable/ic_play_outline"
android:src="@drawable/ic_play_outline_vector"
android:visibility="gone" />
<TextView

View File

@ -34,7 +34,7 @@
android:layout_alignBottom="@+id/thread_mesage_attachments_holder"
android:layout_marginEnd="@dimen/medium_margin"
android:layout_marginBottom="@dimen/activity_margin"
android:src="@drawable/ic_play_outline"
android:src="@drawable/ic_play_outline_vector"
android:visibility="gone" />
<TextView

View File

@ -8,7 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong