Android Question Open mail app

luke2012

Well-Known Member
Licensed User
Longtime User
Hi to all!
I'm able to open gmail using intent object.
I wish to open mail's phone native app.

I have to change only the "com.google.android..." string of the intent?

B4X:
Sub OpenGmail
   Try
     Dim pm As PackageManager
     Dim i As Intent
     i = pm.GetApplicationIntent("com.google.android.gm")
     StartActivity(i)
     ToastMessageShow("GMail", True)
   Catch
     ToastMessageShow("Gmail inactive or not installed...", True)
   End Try
End Sub
 

luke2012

Well-Known Member
Licensed User
Longtime User
Thank you Luca!
I had solved using the correct package name : "com.google.android.email".

My taget was to allow the user to open the mail within my app.
Your code is useful for create a new mail ! Thanks!
 
Upvote 0
Top