I thought I had fixed it...
I used an older phone (with Android 14) which showed the same problem, to check my code, and the fix below fixed it on that phone.
It seems to be the result of Android now integrating chat with gmail.
I found that I had to add an action to the intent, as follows:
Private ei As Email ' requires Phone library
Sub SendEmail( email as String, FileName as string )
ei.To.Add( email )
ei.Body = FileName & " is attached."
ei.Subject = FileName
ei.Attachments.Add( Starter.Provider.GetFileUri( FileName ))
Dim in As Intent = ei.GetIntent
in.Flags = 1 ' FLAG_GRANT_READ_URI_PERMISSION
in.Action = in.ACTION_SEND ' <===== new statement
StartActivity( in )
Ens Sub
But that does not work on my Pixel 7 with Android 15
(It still goes to chat with no option to select gmail instead)