You are reading a single comment by @Hank and its replies. Click here to read the full conversation.
  • I now changed it to

    Bangle.setUI({
      mode : "custom",clock:true,
      remove : function() {
        // Called to unload all of the clock app
    	if (typeof PosInterval === "undefined") {
    		console.log("PosInterval is undefined")
    	} else {
    		if (PosInterval) clearInterval(PosInterval);
    	}	
        PosInterval = undefined;
        if (drawTimeoutSeconds) clearTimeout(drawTimeoutSeconds);
        drawTimeoutSeconds = undefined;
        if (drawTimeout) clearTimeout(drawTimeout);
        drawTimeout = undefined;	
    	if (typeof onDrag !== "undefined") Bangle.removeListener('drag',onDrag);
    	if (typeof onLock !== "undefined") Bangle.removeListener('onLock',onLock);
      }});
    

    Now, the loader shows up, but the Listener seems to be still in place.

  • There shouldn't be quotation marks around undefined.

    Try:
    if (typeof onDrag !== undefined) Bangle.removeListener('drag',onDrag);

About

Avatar for Hank @Hank started