Send email without show the list of apps

coslad

Well-Known Member
Licensed User
Longtime User
Hi,
Is there a way to send a mail directly with gmail and without show the list of alternatve applications?

Thanks

Inviato dal mio GT-P7510 con Tapatalk 2
 

coslad

Well-Known Member
Licensed User
Longtime User
Thanks for reply.
Using the library is it possible to show a progress bar showing the byte sent?



Inviato dal mio H9500 con Tapatalk 2
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Hi again

The problem using the library is that to send the mail the user need to give to the application the email account / password and I don't want this, otherwise I can create a new account on Gmail to use in the app, but the sender of mail will be the m
New common account and not the email of user.
At the end using the Gmail default application I don't need to care if the mail have a big attachment and need more time to be sent and so manage activity pause/resume etc.

Have a line of code as sample about the use of ' component name ' of Gmail apps?

Thanks and excuse may bad English

Inviato dal mio H9500 con Tapatalk 2
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Hi ,
itried , and the response is this:


"Unable to find explicit activity class {com.google.android.gm/com.google.android.gm.ConversationListActivity}; have you declared this activity in your AndroidManifest.xml?"

Now the strange thing is that the gallery can send an image directly to gmail application without open the selection view , so it is possible on every device.


I have tested this code ,in this way i can open gmail but i can not pass the parameter:

B4X:
Dim In As Intent
Dim pm As PackageManager

In = pm.GetApplicationIntent("com.google.android.gm")
StartActivity(In)

Please Erel study the way to do this .

Thanks
 
Last edited:
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Hi,

hi agree with wath you say ,
but i don't undersant why this problem not exist with the system gallery .
In the Gallery you can choose directly to send the photo with Gmail .
Maybe there is a not documentated function.
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I am sending an EMail using GMail with the code below
B4X:
	Dim SendEMail   As Email
	   

       SendEMail.To.Add("XXXXXXXXXXX@Live.com")
       SendEMail.Body    = "Database Rounds Updated"
       SendEMail.Subject = "Database Rounds Updated"
	   
       SendEMail.Attachments.Add(File.Combine(File.DirRootExternal, cDatabase.DatabasePath(True)))
	   
	   
	   Try
    	         Dim EMailIntent As Intent

	   	  EMailIntent = SendEMail.GetIntent
	          EMailIntent.SetComponent("com.google.android.gm/.ComposeActivityGmail")
		  
		  StartActivity(EMailIntent)
	   Catch
	          StartActivity(SendEMail.GetIntent)
	   End Try

Everything works Semi Fine by Semi I mean, GMail Opens all the information is set properly but the user has to press the SEND key to actually send the Email.

Is there a way I can have the SEND key pressed? Can I do something using Reflector (need example if possible) to cause the SEND key in GMail to be pressed?

Also, is there a way to have this happen without GMail actually showing?

A couple of other notes: I tried using SMTP but that requires having a user id / password which I do not want and I do not want to ask and save this information from the user (do not want to be storing passwords if possible).

There must be a simple way of firing off the SEND key?

Thanks

BobVal
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…