Hallo i tried to read out this file into a label, there is 6 lins saved with writline
I got this error ( java.lang.nullpointer expection)
B4X:
sub smsbmi
Dim textreader1 As TextReader
textreader1.Initialize(File.OpenInput(File.DirRootExternal &"/pulsdata/mail", "Helge.doc"))
Dim linje As String
linje = textreader1.ReadLine
Do While linje <> Null
linje = textreader1.ReadLine
Lab.Text=linje
Loop
textreader1.Close
End Sub
It is here it works whith one line in the lab.text. i use it somwhere else in this app and i another apps:
is there a limit for how mutch text i can putt in sthe string?
B4X:
r.RunMethod4("sendTextMessage", Array As Object(PhoneNumber, Null, Text, Null, Null),
B4X:
Sub SendSms(PhoneNumber As String, Text As String)
Dim ps As PhoneSms
Dim r As Reflector
r.Target = r.RunStaticMethod("android.telephony.SmsManager", "getDefault", Null, Null)
r.RunMethod4("sendTextMessage", Array As Object(PhoneNumber, Null, Text, Null, Null), _
Array As String("java.lang.String", "java.lang.String", "java.lang.String", _
"android.app.PendingIntent", "android.app.PendingIntent"))
End Sub
Sms messages are limited to a certain length. However I don't think that this is the cause for this exception. You should post the full stack trace from the logs.
Here is the log I thing it is the lengt off the text that cause the problem when remove som lins in the file it is ok. How can I get the text to been sendt in to sms like i do on the phone And likly camtrue like one sms?