How to run an app using Intent ...

rdt1964

New Member
Licensed User
Longtime User
Hi,

I would like to run an app from my program. I understand
I have to use "Intent". The question what is the exact name of
the app.

For instance :

Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("xxx")
StartActivity(Intent1)

On xxx I would like to activate the waze app.
Is this the right thing to do ??

Thank you in advance,

Alberto.
 

NJDude

Expert
Licensed User
Longtime User
You can do what Erel suggested:
B4X:
Dim Intent1 As Intent

Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("com.waze/.FreeMapAppActivity") 

StartActivity(Intent1)
Or, something like this too:
B4X:
'You need to reference the Phone library.

Dim pm As PackageManager
Dim in As Intent

in = pm.GetApplicationIntent("com.waze")

If in.IsInitialized Then 
            
   StartActivity(in)
                     
End If
 
Last edited:
Upvote 0
Top