create email

mhartwig

Member
Licensed User
Longtime User
I have mailto: links within a webview. The email code doesnt seem to work.

B4X:
Sub ShelterEmail_OverrideUrl(url As String) As Boolean
    If url.Contains("mailto:") Then
      Dim Message As Email
      Message.To.Add(url.Replace("mailto:", ""))
      Message.Subject = "PetFinder ID " & selpet.ID & " - " & selpet.Name
      StartActivity(Message.GetIntent) 
      Return True
   End If
End Sub

On my tablet it launches dropbox and not the email app. On my phone it launches the text messaging app.
 

mhartwig

Member
Licensed User
Longtime User
nm it does appear to work. I had to install the gmail app from google play. Otherwise it just defaulted to messaging.
 
Upvote 0
Top