mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
Use ShareCompat.IntentBuilder in "shareText()" utility function.
Signed-off-by: Tobias Preuss <tobias.preuss@googlemail.com>
This commit is contained in:
parent
5fd3317197
commit
70b07471cf
1 changed files with 4 additions and 4 deletions
|
@ -314,10 +314,10 @@ fun shareMedia(context: Context, file: File, mediaMimeType: String?) {
|
|||
}
|
||||
|
||||
fun shareText(context: Context, text: String) {
|
||||
val sendIntent = Intent()
|
||||
sendIntent.action = Intent.ACTION_SEND
|
||||
sendIntent.type = "text/plain"
|
||||
sendIntent.putExtra(Intent.EXTRA_TEXT, text)
|
||||
val sendIntent = ShareCompat.IntentBuilder(context)
|
||||
.setType("text/plain")
|
||||
.setText(text)
|
||||
.intent
|
||||
|
||||
sendShareIntent(context, sendIntent)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue