iOS Question Share a string on whatsapp to a direct number

fifiddu70

Well-Known Member
Licensed User
Longtime User
Hello everyone, I have searched all over the b4i forum and have not found how to share a text string on whatsapp to a direct number, on b4a I managed to do it but in b4i I don't know how to do it, I only managed thanks help of LucaMs to share on all social networks, but I need to share direct to a whatsapp number. this is the code that allows sharing in all social networks, how to transform it?

B4X:
Sub imgaggiungi_Click
    speech.StopRecording
    Dim items As List = tableview1.GetItems(0)
    Dim tc As TableCell 'create a new item
    tc.InitializeSingleLine(txtordine.Text)
    items.InsertAt(0, tc)
    tableview1.ReloadSection(0)
    txtordine.Text=""
End Sub

Sub TableView1_SelectedChanged (SectionIndex As Int, Cell As TableCell)
    tableview1.ReloadSection(0)
    tableview1.RemoveCells(SectionIndex, tableview1.GetItems(SectionIndex).IndexOf(Cell), 1)
End Sub

Sub imginvio_Click
    
    
    Dim testo As String
    testo = txtdati.Text
    Dim sb As StringBuilder
    sb.Initialize
    For Each tc As TableCell In tableview1.GetItems(0)
    sb.Append(tc.Text.ToString).Append(CRLF)
    Next
    Dim avc As ActivityViewController
    avc.Initialize("avc", Array("ORDINAQUI' I, Lista della spesa di: "& CRLF & testo & CRLF & "-----------------" & CRLF & sb.ToString , ""))' share all social or email etc.
    avc.Show(Page1, Page1.RootPanel)
    tableview1.Clear
    
    
End Sub
 
Top