I am trying to put my Main Activity into Paused mode.
I run this:
Dim i As Intent
i.Initialize(i.ACTION_MAIN, "")
i.AddCategory("android.intent.category.HOME")
i.Flags = 268435456 ' FLAG_ACTIVITY_NEW_TASK
StartActivity(i)
It acts as if you pressed HOME; but Activity_Paused doesn't trigger on my Activity and it must be in Foreground mode still.
I tried adding i.Action = "android.intent.action.USER_FOREGROUND" before 'StartActivity(i)'... but I guess many tasks can all be in a Foreground state.
Is there a way of getting the Intent of my Activity and setting its action to i.Action = "android.intent.action.USER_BACKGROUND" either with the Reflection library, or somesuch.
I run this:
Dim i As Intent
i.Initialize(i.ACTION_MAIN, "")
i.AddCategory("android.intent.category.HOME")
i.Flags = 268435456 ' FLAG_ACTIVITY_NEW_TASK
StartActivity(i)
It acts as if you pressed HOME; but Activity_Paused doesn't trigger on my Activity and it must be in Foreground mode still.
I tried adding i.Action = "android.intent.action.USER_FOREGROUND" before 'StartActivity(i)'... but I guess many tasks can all be in a Foreground state.
Is there a way of getting the Intent of my Activity and setting its action to i.Action = "android.intent.action.USER_BACKGROUND" either with the Reflection library, or somesuch.