Skip to content

Commit

Permalink
Add FLAG_ACTIVITY_NEW_TASK flag to intent for starting activity
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeCla committed May 6, 2024
1 parent 1128d31 commit e69216a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ internal class RootViewModel: ViewModel {
val data = Uri.parse(link) ?: return
val intent = Intent(Intent.ACTION_VIEW).apply {
this.data = data
this.flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
this.context.startActivity(intent)
try {
this.context.startActivity(intent)
} catch (_: Throwable) {}
}

private fun render(destId: String, properties: List<Property>? = null) {
Expand Down

0 comments on commit e69216a

Please sign in to comment.