Sub Activity_Pause (UserClosed As Boolean)
If UserClosed = True Then
If AStreams.IsInitialized = True Then
AStreams.Close
End If
ExitApplication
Return
End If
End Sub
Hugo, I think it's this definition that is causing the compile error :
B4X:
Sub AStreams( ABuffer() As Byte )
End Sub
If you remove this, it works - are you sure the definition can be received like that into the Sub? Admittedly you are using a later version of B4A than I am.. I'll update this and see if this gives a different issue.