above code is giving me the error:
lastexcection android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.gm/com.google.android.gm.composeactivitygmal}; have you declared this activity in your androidmanifest.xml?
If you open the IDE and check the unfiltered logs all the activity on the device will show up there, you will have to read real closely, you can practice by "finding" the GMail intent I posted.
I suggest you CLEAR the logs before doing any search, like I said, it takes a little practice and getting used to.
To get the unfiltered logs, in the IDE click on LOGS on the tabs at the bottom right, then UNCHECK the FILTER box.
Like I explained above, you have to read ALL THE TEXT in the logs and sift through it until you find what you are looking for, you have to also know how to use intents, so, if you don't have a lot of experience at the moment it will be very difficult to explain.
Another way to do that will be using the Phone library and PackageManager, in that case you will need to know the Package name, for example, this will also open the GMail app:
B4X:
Dim pm As PackageManager
Dim i As Intent
i = pm.GetApplicationIntent("com.google.android.gm")
StartActivity(i)