Android Question Send an email is starting sharing option

Vinians2006

Active Member
Licensed User
Longtime User
Hello friends, I am using Email object to send an email but when the users clicks on the button it opens the shareing and the user need to select a lot of options. I want to start gmail directly, any solution to that ? See the code:
B4X:
    If Not (G.Registrado) Then
        Private emlMsg As Email
        emlMsg.To.Add("test@server.com")
        emlMsg.Subject = "Subject"
        emlMsg.Body = "Message body"
        StartActivity(emlMsg.GetIntent)
    End If
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hello friends, I am using Email object to send an email but when the users clicks on the button it opens the shareing and the user need to select a lot of options. I want to start gmail directly, any solution to that ? See the code:
B4X:
    If Not (G.Registrado) Then
        Private emlMsg As Email
        emlMsg.To.Add("test@server.com")
        emlMsg.Subject = "Subject"
        emlMsg.Body = "Message body"
        StartActivity(emlMsg.GetIntent)
    End If
What if the user doesn't use GMail? Or what if (like me) they have more than 1 email account & use GMail for one & another mail client for another? You don't want to force them to use GMail - especially if they don't normally use it.

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Yes, but I do not want to use this solution because I distribute my app directly and dont use google play. But thank you for your help.
I don't think this solution uses Google Play. It does use OAuth - but that is accessed via the Google APIs console (not the Google Play Developer Console).

- Colin.
 
Upvote 0

Vinians2006

Active Member
Licensed User
Longtime User
Thank you people, I solved the problem using a webview with a form, then sending with mailtto. Thank you !
 
Upvote 0
Top