Android Question Async Streams - Sending bitmaps | Avoid mistake

pauleffect

Member
Licensed User
Longtime User
Hello.

I have this
B4X:
(...)
Case "play"
            Dim input As String = value
            Log("play " & input)
            File.WriteString(File.DirApp,"output.txt", input)
            astreamO.WriteFile("screenStream", File.DirApp, "sS.jpg")
            Log("sent")
(...)
in b4j. Async streams, as you noticed.


I'm trying to get that file as a background for an image view. I'm trying.
My app says:
class cast exception: strings can't be cast to android.graphics.bitmap.

B4X:
    Select Key
        Case "screenStream"
        Dim bmp As Bitmap = Value
I give up... If you can help a noob, superb.
If not, well.... Guess i'll look for other solutions...
Thanks.
 

pauleffect

Member
Licensed User
Longtime User
Thanks Erel. I messed up.

I mistook value for the stuff being sent.

As I wasn't sending files until now, was no big deal.

Thank you again!
 
Upvote 0
Top