• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0016 秒)

1. Native(android)下创建二维码并显示在页面上 [ 100%]

...bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); baos.flush(); baos.close(); byte bitmapBytes = baos.toByteArray(); result = Base64.encodeToString(bitmapBytes, Base64.DEFAULT); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (baos != null) { baos.flush(); baos.close(); }...

来源: Laya_社区 发布时间: 20200729

2. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 71%]

...触发。 Event.MESSAGE:收到服务器发送的数据时触发。 Event.CLOSE:连接关闭时触发。 Event.ERROR:连接出错时触发。 示例代码: // 注册事件监听示例 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMes...

来源: Laya3.0_文档 发布时间: 20251010