Android Question background command

jchal

Active Member
Licensed User
Longtime User
what is the comand to send an app in background?
for example if i press a button in the app it will be sened in background
 

mangojack

Expert
Licensed User
Longtime User
i wanted something like hide app

Hang on .. I'll see if Erel can whip something up for you ..;).

Maybe supply some more info .. When you press the button , Why do you want to hide the app ? Do you want to just hide one activity to show another ..?
 
Upvote 0

jchal

Active Member
Licensed User
Longtime User
well it is not this the case.
what i wanted to do is to press a button and then to move the app in background, and the user will be able to see the rest of the app and run a new app if he wishes, the app will run and you are going to be able to see it in background.
i am doing this at the moment by pressing the midle button (home) of me mobile phone.
but i wanted to do it imediatly fro m the app.
sorry if i miss lead you
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
but i wanted to do it imediatly fro m the app.
That´s exactly the code Erel provided! Why you don´t take the suggestion?
 
Upvote 0

jchal

Active Member
Licensed User
Longtime User
yes this is it
B4X:
Dim i AsIntent
i.Initialize(i.ACTION_MAIN, "")
i.AddCategory("android.intent.category.HOME")
i.Flags = 0x10000000StartActivity(i)
thanks a lot
 
Upvote 0
Top