Open an application

h0Oray

New Member
Licensed User
Longtime User
Hi everybody.

I want to open an other application when pressing a button.

This is simply:
Dim in As Intent
Dim pm As PackageManager
in = pm.GetApplicationIntent("com.xtralogic.android.rdpclient.trial")
If in.IsInitialized Then StartActivity(in)
StartActivity(in)

But now i don´t want to open the Mainactivity of the application. I want to open the remoteconnection directly.

How do i it?
 

NJDude

Expert
Licensed User
Longtime User
You need to know the name of the activity, the code below will open the Help Activity directly:
B4X:
Dim in As Intent
Dim pm As PackageManager

in = pm.GetApplicationIntent("com.xtralogic.android.rdpclient.trial")

If in.IsInitialized Then

   in.SetComponent("com.xtralogic.android.rdpclient.trial/.HelpActivity")

   StartActivity(in)    

End If

However, this app it doesn't allow its activities to be called in this manner, they have to be called from the Main Activity, the only one that can be called in this case is the HELP, but at least now you know how to call activities directly.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…