Alessandro71 Well-Known Member Licensed User Longtime User Dec 6, 2021 #1 I'm composing an email with the following code, but the StartActivity allows the user to choose from all apps (including Drive, Whatsapp, etc) Is there a way to limit the user to choose only valid email apps (eg: GMail, Yahoo Mail, Outlook, etc)? B4X: Copy Dim email As Email email.To.Add(m_EmailAddress) email.Subject = Subject email.Body = Body email.Attachments.Add(Starter.Provider.GetFileUri(FileName)) Dim in As Intent = email.GetIntent in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION StartActivity(in)
I'm composing an email with the following code, but the StartActivity allows the user to choose from all apps (including Drive, Whatsapp, etc) Is there a way to limit the user to choose only valid email apps (eg: GMail, Yahoo Mail, Outlook, etc)? B4X: Copy Dim email As Email email.To.Add(m_EmailAddress) email.Subject = Subject email.Body = Body email.Attachments.Add(Starter.Provider.GetFileUri(FileName)) Dim in As Intent = email.GetIntent in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION StartActivity(in)
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2021 #2 Not really. It will create a different type of intent if there are no attachments or there are 2+ attachments. You can try it and see if the results are better. Upvote 0
Not really. It will create a different type of intent if there are no attachments or there are 2+ attachments. You can try it and see if the results are better.
Alessandro71 Well-Known Member Licensed User Longtime User Dec 6, 2021 #3 Erel said: Not really. It will create a different type of intent if there are no attachments or there are 2+ attachments. You can try it and see if the results are better. Click to expand... with 2 attachments, the list of apps is greatly reduced, but still not limited to email (Whatsapp and Linkedin are still present for example) Upvote 0
Erel said: Not really. It will create a different type of intent if there are no attachments or there are 2+ attachments. You can try it and see if the results are better. Click to expand... with 2 attachments, the list of apps is greatly reduced, but still not limited to email (Whatsapp and Linkedin are still present for example)