adding an extra flag at creating our own launcher intent

This commit is contained in:
tibbi 2022-10-14 10:56:05 +02:00
parent cb483bf15c
commit c39f8da9e7
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ fun Activity.launchApp(packageName: String, activityName: String) {
addCategory(Intent.CATEGORY_LAUNCHER)
`package` = packageName
component = ComponentName.unflattenFromString("$packageName/$activityName")
addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
startActivity(this)
}
} catch (e: ActivityNotFoundException) {

View File

@ -247,6 +247,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
-1,
appWidget.appPackageName,
"",
"",
type,
appWidget.className,
-1,