function touch1() {
  Bangle.on("touch", side => {
    if (!Bangle.isLCDOn()) {return;} // for <2v10 firmware
    switch(side) {
      case 1:
        pausePrev();
        break;
      case 2:
        nextPlay();
        break;
      default:
        togglePlay();
        break;
    }
  });
  Bangle.on("swipe", dir => {
    if (!Bangle.isLCDOn()) {return;} // for <2v10 firmware
    sendCommand(dir===1 ? "previous" : "next");
  });
}
/**
 * Setup touch+swipe for Bangle.js 1
 */
Setup touch+swipe for Bangle.js 1
Setup touch + swipe for Bangle . js 1
function touch1() {
  Bangle.on("touch", side => {
    if (!Bangle.isLCDOn()) {return;} 
    switch(side) {
      case 1:
        pausePrev();
        break;
      case 2:
        nextPlay();
        break;
      default:
        togglePlay();
        break;
    }
  });
  Bangle.on("swipe", dir => {
    if (!Bangle.isLCDOn()) {return;} 
    sendCommand(dir===1 ? "previous" : "next");
  });
}
function touch1 ( ) { Bangle . on ( "touch" , side => { if ( ! Bangle . isLCDOn ( ) ) { return ; } switch ( side ) { case 1 : pausePrev ( ) ; break ; case 2 : nextPlay ( ) ; break ; default : togglePlay ( ) ; break ; } } ) ; Bangle . on ( "swipe" , dir => { if ( ! Bangle . isLCDOn ( ) ) { return ; } sendCommand ( dir === 1 ? "previous" : "next" ) ; } ) ; }
Setup touch+swipe for Bangle.js 1
Setup touch + swipe for Bangle . js 1
// for <2v10 firmware // for <2v10 firmware