My application's subscribing incoming ACTION_SEND data from another app.
It works as well when I shared a text from another app into my app. But in case of finishing my app then re-opening it from Recent tab, the ACTION_SEND data keep retaining.
I expected that shared data is cleared when my app is finished. How to resolve this?
This is my snippet code:
if (Intent.ACTION_SEND == action && type != null) {
if ("text/plain" == type) {
val sharedText = intent.getStringExtra(Intent.EXTRA_TEXT)
if (sharedText != null && URLUtil.isValidUrl(sharedText)) {
sharedUrl = sharedText
}
}
}