adding an extra flag at creating our own launcher intent
This commit is contained in:
parent
cb483bf15c
commit
c39f8da9e7
|
@ -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) {
|
||||
|
|
|
@ -247,6 +247,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
|
|||
-1,
|
||||
appWidget.appPackageName,
|
||||
"",
|
||||
"",
|
||||
type,
|
||||
appWidget.className,
|
||||
-1,
|
||||
|
|
Loading…
Reference in New Issue