forked from Blendman974/faceclaw
iOS porting: Battery indicators, app icon, add the rest of the apps
This commit is contained in:
1 parent
00a5e38f75
commit
e5ba7abc18
31 files changed
+501
-65
No files matched your search
@@ -0,0 +1,9 @@
|
||||
declare const com: any
|
||||
export type SocketListener = { onOpen(): void; onTextMessage(message: string): void; onClosed(code: number, reason: string): void; onFailure(message: string): void }
|
||||
export function openSocket(url: string, listener: SocketListener): { sendText(text: string): void; close(code: number, reason: string): void } {
|
||||
const proxy = new com.faceclaw.app.FaceclawWebSocketListener(listener)
|
||||
const native = new com.faceclaw.app.FaceclawWebSocket(url, proxy, null, null)
|
||||
const connection = { listenerProxy: proxy, sendText: (text: string) => native.sendText(text),
|
||||
close: (code: number, reason: string) => native.close(code, reason) }
|
||||
return connection
|
||||
}
|
||||
Reference in new issue
Block a user