Hello, I'm new to Kotlin and I'm trying to code an...
# getting-started
n
Hello, I'm new to Kotlin and I'm trying to code an application with the IDE AndroidStudio. I would like to recover a csv file send by an other application thus I would like that my application shows in the selection area of the other application ( like Gmail in the ScreenShot). Do you you know how I can do this ? Or do you have any link that explain how to do it ?
n
Hi, you can watch share data with Intent
n
I wrote this in my AndroidManist but my app still won't show in the selection area of the other app :
Copy code
<intent-filter>
                <action android:name="android.intent.action.SEND"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:name="text/csv"/>
            </intent-filter>
n
??
Copy code
val sendIntent: Intent = Intent().apply {
    action = Intent.ACTION_SEND
    putExtra(Intent.EXTRA_TEXT, "This is my text to send.")
    type = "text/plain"
}

val shareIntent = Intent.createChooser(sendIntent, null)
startActivity(shareIntent)
adapt your code and it’s finish
n
thank you 🙂