button click is only working on Windows & not working on Android mobile sheet

Workaround is to use checkboxes(say, in F1) instead of buttons/Images. Then hook your function, that is supposed to run on button click to a trigger function like onEdit().

Sample script:

function onEdit(e){
  const rg = e.range;
  if(rg.getA1Notation() === "F1" && rg.isChecked() && rg.getSheet().getName() === "Sheet1"){
    callFunctionAttachedToImage();
    rg.uncheck();
  }
}

Some limitations of this workaround in mobile app is described here.

References:

Leave a Comment