       (helper/keep-screen-on! this)
       (helper/landscape! this)
       (websocket/connect! (:ws-url config)
-                          {:on-open (fn [_])
-                           :on-close (fn [code reason remote])
+                          {:on-open (fn [_]
+                                      (log/i "darknet" "websocket open" ))
+                           :on-close (fn [code reason remote]
+                                       #_(toast code reason remote)
+                                       (log/i "darknet" code reason remote))
+                           
                            :on-message on-message
-                           :on-error (fn [e] )})
+                           :on-error (fn [e]
+                                       #_(toast (.getMessage e))
+                                       (log/i "darknet" (.getMessage e)))})
       (on-ui
           (set-content-view! (*a)
             [:linear-layout {:id ::container

                                                   (camera-view this instruction))
                           "streamVideo" (stream-view this instruction)
                           "displayImage" (view-image this instruction)
                           "viewVideo" (view-video this instruction)
                           "saveToLocal" (save-to-local! this instruction)
                           "viewLocalImage" (view-local-image this instruction)
                           "viewLocalVideo" (view-local-video this instruction)
                           "stop" (default-view this)
                           :default)))
          sizes {:rear (camera/preview-sizes 0)

            [neko.threading :refer [on-ui]]
            [neko.log :as log]
            [neko.intent :as intent]
            [neko.notify :refer [toast]]
            [neko.ui :refer [make-ui]]
            [neko.ui.mapping :refer [defelement]]
            [uk.org.potentialdifference.darknet.config :refer [config]]
