Android Question How can I run or open another application from my code?

nedium

Active Member
Licensed User
Longtime User
Hello everyone and thank you for your help.

Using the following code I can open the application I want, but what I want is to open it without closing my application, or failing that, if there are no more options or it must be closed, I would like it to be reopened or put in the foreground on my screen. application, since the other application that I want to open is not necessary to have in the foreground since I only need the application service.

Exemple:
Sub YourButton_Click
  Try
    Dim Intent1 As Intent
    Dim pm as PackageManager
    Intent1 = pm.GetApplicationIntent ("com.package.tolaunch")
    StartActivity (Intent1)
      Catch
      ToastMessageShow ("Failed to launch app!  Is it installed?", True)
  End Try
End Sub


thanks for your help
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…