Android Question Alternative to Email Library

Scantech

Well-Known Member
Licensed User
Longtime User
Email library will not work with Android 7+.

Do we have a workaround for this?
 

DonManfred

Expert
Licensed User
Longtime User
Email library will not work with Android 7+.
Really? Who said that?

It does work for me. I am using an Device wih Android 7.1 using targetSdk of 26
 
Last edited:
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User

B4X:
Sub DiagReportListViewShare(Index As Int, Value As String)
'    Try
        If Value = "*Mask*" Then Return        'AVOID MASK PANEL
        If Value = "***Mask" Then Return
       
        Dim e As Email
        Dim strBuild As StringBuilder
        strBuild.Initialize
       
        Dim Map1 As Map
        Map1.Initialize
       
        Dim GetVin, GetRO, TempValue As String
       
        Dim strIdent As String
        strIdent = Value
        'internal
        If strIdent.Contains("**INTERNAL**") Then
            strIdent = strIdent.SubString(12)
            If File.Exists(File.DirInternal, DiagReportDir & strIdent & ".txt") Then
                e.Attachments.Add(File.Combine(File.DirInternal, DiagReportDir & strIdent & ".txt"))
                strBuild.Append(File.ReadString(File.DirInternal, DiagReportDir & strIdent & ".txt"))
                Map1 = File.ReadMap(File.DirInternal, DiagReportDir & strIdent)
            End If
        'external
        Else      
            If File.Exists(File.DirRootExternal, DiagReportDir & strIdent & ".txt") Then
                e.Attachments.Add(File.Combine(File.DirRootExternal, DiagReportDir & strIdent & ".txt"))
                strBuild.Append(File.ReadString(File.DirRootExternal, DiagReportDir & strIdent & ".txt"))
                Map1 = File.ReadMap(File.DirRootExternal, DiagReportDir & strIdent)
            End If
        End If
       
        GetVin = Map1.Get("Vin")
        GetRO = Map1.Get("RO")

        'RO
        If GetRO = "null" Or GetRO = "" Then
        Else
            TempValue = "RO#: " & GetRO
        End If
       
        'VIN      
        If GetVin = "null" Or GetVin = "" Then
        Else
            TempValue = TempValue & " " & "VIN: " & GetVin
        End If
       
        e.Subject = "Diagnostic Report Log (" & TempValue & ")"
        e.Body = strBuild.ToString
        e.To.Add("")
           
        StartActivity(e.GetIntent) 'this is where the point break stops
'    Catch
'        Msgbox2Async("Error occurred in DiagReportListaViewShare." & Chr(10) & LastException.Message, "Error", "OK", "", "", LoadBitmap(File.DirAssets, "disclaimer.png"), True)
'    End Try
End Sub
 
Upvote 0

DonManfred

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