'1. Add a new app manifest queries section
AddManifestText(<queries>
<package android:name="com.google.android.gm"/>
</queries>)
'2. Method Function
Private Sub isPackageInstalled(packageName As String) As Boolean
Dim Intent1 As Intent
Dim pm As PackageManager
Intent1 = pm.GetApplicationIntent(packageName)
Return Intent1.IsInitialized
End Sub
'3. Calling Sub
Private Sub btnEmail_Click
If isPackageInstalled("com.google.android.gm") = False Then
ToastMessageShow("GMAIL App is required to send emails.", True)
Else
ToastMessageShow("Gmail Installed", True)
End If
Email.Email_Result
End Sub