- final is out ! Thanks you all for the feedback !
- beta 4 is out, it includes AAB (Android App Bundle) package creation and some fixes to be able to publish on Google Play. I tried it and it works as expected. An AAB package will be now automatically generated when creating an Android app which is not in debug mode. Feel free to test it to see if it works as expected ! If you want to test the app I published, use this link: https://play.google.com/apps/internalte ... 7859621339 and send me your email in PM.
- beta 3 is out, it includes the final doc for all new stuffs, a few fixes and a few new commands:
Code: Select all
DesktopResolutionX(), DesktopResolutionY(), DesktopScaledX(), DesktopScaledY(), DesktopUnscaledX(), DesktopUnscaledY()
Code: Select all
- Added #PB_EventType_Focus and #PB_EventType_LostFocus to TreeGadget()
- Added #PB_Tree_Expanded support to SetGadgetAttribute() for TreeGadget() to quickly expand/collapse all nodes
- Added HighAccuracy parameter to StartGeolocation() to use the real GPS if available.
- Added #PB_ListIcon_GridLines support
- Updated: android framework to android-32 to be able to publish app on Google PlayStore
- Updated: the application license file
Now, back on the new release which brings some interesting changes and new features (including the bug fixes from the 2.32 beta version):
Code: Select all
- Added WebSocket library: OpenWebSocket(), CloseWebSocket(), SendWebSocketData(), SendWebSocketString()
- Added Packer library: CompressMemory(), UncompressMemory(), CompressString(), UncompressString()
- Added Clipboard library: SetClipboardText()
- Added Event(), EventString(), EventWebSocket()
- Added FormatNumber()
- Added Base64Encoder(), Base64Decoder(), Base64EncoderBuffer(), Base64DecoderBuffer()
- Changed the behaviour of GetMapElement(), it now always creates a new element if not found.
- StrD will switch to exponent notation if too big (> e+21)
- Added a timestamp to the index.html to avoid caching problem
- Added native OS X arm64 version
- Added all IDE improvement from PureBasic
Code: Select all
Procedure Events()
Select Event()
Case #PB_Event_Gadget
Select EventGadget()
Case 0
SendWebSocketString(2, "Hello !")
Case 1
*Buffer = AllocateMemory(100)
PokeA(*Buffer, 0, 25)
PokeA(*Buffer, 10, 26)
;SendWebSocketData(2, *Buffer) ; Send the whole buffer (100 bytes)
;SendWebSocketData(2, *Buffer, 10, 20) ; Send only a part of the buffer (20 bytes starting from 10)
; *Compressed = CompressMemory(*Buffer)
*Compressed = CompressString("Test "+Space(1000)+"End")
Debug "Compressed size (from 1000 bytes): "+MemorySize(*Compressed)
SendWebSocketData(2, *Compressed)
EndSelect
Case #PB_Event_WebSocket
Select EventType()
Case #PB_EventType_Connected
Debug "WebSocket #" + EventWebSocket() + " connected."
Case #PB_EventType_Closed
Debug "WebSocket #" + EventWebSocket() + " closed."
Case #PB_EventType_String
Debug "String recieved on WebSocket #" + EventWebSocket() + "."
Debug "String content: " + EventString()
Case #PB_EventType_Data
Debug "Data recieved on WebSocket #" + EventWebSocket() + "."
*Buffer = EventData()
Debug "Data size: " + MemorySize(*Buffer) + ". First byte: " + PeekA(*Buffer, 0)
; *Uncompressed = UncompressMemory(*Buffer)
;Debug MemorySize(*Uncompressed)
;Debug PeekA(*Uncompressed, 0)
Result$ = UncompressString(*Buffer)
Debug Result$
FreeMemory(*Buffer)
Case #PB_EventType_Error
Debug "Error on WebSocket #" + EventWebSocket() + "."
EndSelect
EndSelect
EndProcedure
BindEvent(#PB_Event_Gadget, @Events())
BindEvent(#PB_Event_WebSocket, @Events())
OpenWindow(0, 100, 100, 500, 100, "WebSocket test")
ButtonGadget(0, 10, 10, 200, 30, "Send string !")
ButtonGadget(1, 10, 45, 200, 30, "Send Data !")
If OpenWebSocket(2, "ws://127.0.0.1:8090/")
Debug "Trying to open the websocket"
Else
Debug "Web socket not supported."
EndIf
Have fun !
The Fantaisie Software Team