Return to home screen

Sports90

Member
Licensed User
Longtime User
Hello,

New to B4A so I'm attempting to start a program which goes back to androids main screen.

Here's the code in question.

B4X:
Sub ClickHome
   Dim i As Intent
   i.Initialize("android.intent.category.HOME","")
   i.SetComponent("com.android.launcher/com.android.launcher2.Launcher")
   Try
      StartActivity(i)
   Catch
      ToastMessageShow("Home Click Failed", True)
   End Try
End Sub

Thanks for all your help
 

Sports90

Member
Licensed User
Longtime User
Have two separate apps i'm running depending on what the client purchased. Want to switch between each one via the home screen on android. This was fairly simple under windows. So, attempting to replicate the process on android.

Thanks
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Why don't you start the other program directly?

We often get so blind-sided by this marvel, we sometimes overlook the bleeding obvious.

Thankfully we have you (and many others) to keep us grounded.
 
Upvote 0
Top