forked from upstream-mirrors/quik
Add support for sharing text from other app
This commit is contained in:
@@ -46,6 +46,16 @@
|
|||||||
<data android:scheme="mmsto" />
|
<data android:scheme="mmsto" />
|
||||||
<data android:scheme="sms_body" />
|
<data android:scheme="sms_body" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="text/plain" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="presentation.feature.settings.SettingsActivity" />
|
<activity android:name="presentation.feature.settings.SettingsActivity" />
|
||||||
<activity android:name="presentation.feature.setup.SetupActivity" />
|
<activity android:name="presentation.feature.setup.SetupActivity" />
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class Navigator @Inject constructor(val context: Context) {
|
|||||||
|
|
||||||
fun showCompose(body: String? = null) {
|
fun showCompose(body: String? = null) {
|
||||||
val intent = Intent(context, ComposeActivity::class.java)
|
val intent = Intent(context, ComposeActivity::class.java)
|
||||||
intent.putExtra("body", body)
|
intent.putExtra(Intent.EXTRA_TEXT, body)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ class ComposeViewModel(intent: Intent) : QkViewModel<ComposeView, ComposeState>(
|
|||||||
init {
|
init {
|
||||||
appComponent.inject(this)
|
appComponent.inject(this)
|
||||||
|
|
||||||
draft = intent.extras?.getString("body") ?: ""
|
draft = intent.extras?.getString(Intent.EXTRA_TEXT) ?: ""
|
||||||
|
intent.clipData
|
||||||
val threadId = intent.extras?.getLong("threadId") ?: 0L
|
val threadId = intent.extras?.getLong("threadId") ?: 0L
|
||||||
var address = ""
|
var address = ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user