Skip to content

Commit 02b778a

Browse files
I have fixed intent to backup's
1 parent c9ea10f commit 02b778a

File tree

1 file changed

+6
-0
lines changed
  • app/src/main/java/com/github/droidworksstudio/launcher/helper

1 file changed

+6
-0
lines changed

app/src/main/java/com/github/droidworksstudio/launcher/helper/AppHelper.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,25 +264,29 @@ class AppHelper @Inject constructor() {
264264
Intent.EXTRA_TEXT,
265265
"$description https://f-droid.org/packages/${context.packageName}"
266266
)
267+
shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
267268
context.startActivity(Intent.createChooser(shareIntent, "Share Application"))
268269
}
269270

270271
fun helpFeedbackButton(context: Context) {
271272
val uri = Uri.parse("https://github.com/DroidWorksStudio/EasyLauncher")
272273
val intent = Intent(Intent.ACTION_VIEW, uri)
274+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
273275
context.startActivity(intent)
274276
}
275277

276278
fun communitySupportButton(context: Context) {
277279
val uri = Uri.parse("https://t.me/DroidWorksStudio/")
278280
val intent = Intent(Intent.ACTION_VIEW, uri)
281+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
279282
context.startActivity(intent)
280283
}
281284

282285
fun emailButton(context: Context) {
283286
val emailIntent = Intent(Intent.ACTION_SENDTO)
284287
emailIntent.data = Uri.parse("mailto:droidworksstuido@063240.xyz")
285288
emailIntent.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name)
289+
emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
286290
context.startActivity(Intent.createChooser(emailIntent, "Choose Mail Application"))
287291
}
288292

@@ -296,6 +300,7 @@ class AppHelper @Inject constructor() {
296300
type = "application/json"
297301
putExtra(Intent.EXTRA_TITLE, fileName)
298302
}
303+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
299304
activity.startActivityForResult(intent, Constants.BACKUP_WRITE, null)
300305
}
301306

@@ -304,6 +309,7 @@ class AppHelper @Inject constructor() {
304309
addCategory(Intent.CATEGORY_OPENABLE)
305310
type = "application/json"
306311
}
312+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
307313
activity.startActivityForResult(intent, Constants.BACKUP_READ, null)
308314
}
309315

0 commit comments

Comments
 (0)