sms from file

volvomann

Active Member
Licensed User
Longtime User
Hallo I use file whith 6 lins saved whith writeline how can read this 6 lines into an sms txt so i can send them ?
 

genesi

Active Member
Licensed User
Longtime User
try this
B4X:
Sub ReadTextReader
    
   Dim Sms1 As PhoneSms

    Dim TextReader1 As TextReader

    TextReader1.Initialize(File.OpenInput(File.DirRootExternal, "Text.txt"))
    Dim line As String
    line = TextReader1.ReadLine    
    Do While line <> Null
         line = TextReader1.ReadLine
         Sms1.Send(111111111111,line)     
    Loop

    TextReader1.Close
End Sub

text.txt is your file and 1111111 your phone number
ciao mario
 
Upvote 0
Top