Hi:
Follows the error message:
main_auxiliar_foto (java line: 770)
java.lang.RuntimeException: Error loading bitmap.
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize2(CanvasWrapper.java:539)
at b4a.example.main._auxiliar_foto(main.java:770)
at b4a.example.main._recebeu(main.java:2637)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1083)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:1038)
at b4a.example.starter._astream_newdata(starter.java:201)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:883)
and the app lines:
Dim buffer() As Byte
Dim b As Bitmap
Dim In As InputStream
bytesFOTO = FIG_STRING.GetBytes("UTF8")
FIG_STRING = FIG_STRING.SubString(FIG_STRING.IndexOf(",")+1)
buffer = su.DecodeBase64(FIG_STRING)
In.InitializeFromBytesArray(buffer, 0, buffer.Length)
File.WriteString(File.DirInternal, IndiceDeImagens & ".txt", FIG_STRING)
b.Initialize2(In)
ImageView1xx.Bitmap = b
ImageView1xx.Gravity = Gravity.center
bytesFOTO and FIG_STRING are defined at GLOBALS. IndiceDeImagens contains the picture name without ".txt".