Android Question How to "minimize" app

Steve Miller

Active Member
Licensed User
Longtime User
I have a kiosk app that I need to temporarily minimize. Is there a way to "minimize" the activity? I need to keep the app running, but want to minimize it so the user can access a notification that falls behind my app.

I have a boolean variable that I set to true when in Kiosk mode and false when not. So, when in Kiosk mode, it does some logic to keep the program as the forefront app. When not in kiosk mode, I can close the app or access any other app. What I want to do is programatically minimize the app so I can give the user a chance to respond to a popup notification from another app that is running behind mine. I set a timer to turn the kiosk mode back on after 5 seconds, so it would automatically become forefront again. I'm just not clear how to minimize.

I tried Activity.Height=0, but that didn't work.
 

Jmu5667

Well-Known Member
Licensed User
Longtime User
Try this :)

B4X:
Sub Activity_Minimize
 
   Dim i As Intent
   i.Initialize(i.ACTION_MAIN, "")
   i.AddCategory("android.intent.category.HOME")
   i.Flags = 0x10000000
   StartActivity(i)
   
   
End Sub
 
Upvote 0
Top