If there's interest it could modified to handle multiple objects, and/or posted on DroidStore.
// spread and pinch for zoom.
// zooms from minimum 1 to maximum 10 (initial value 5)
// scale can be adjusted to be more/less sensitive to movements
cfg.Portrait
const min=1, max=10, scale=0.1 ;
var zoom = 5, oldsep="" ;
function OnStart() {
lay = app.CreateLayout( "linear", "VCenter,FillXY" ) ;
txt = app.AddText(lay,zoom,1,-1) ;
img = app.AddImage( lay, "/Sys/Img/Hello.png", 1 ) ;
img.SetOnTouch(OnTouch) ;
app.AddLayout( lay ) ;
} // OnStart
function OnTouch(event) {
// var source = event.source ;
// var action = event.action ;
// var count = event.count ;
if (event.action == "Up") {oldsep = ""; return; }
if (event.count == 2) {
var arrayx = event.x ;
var arrayy = event.y ;
x0 = arrayx[0]; x1 = arrayx[1];
y0 = arrayy[0]; y1 = arrayy[1];
currsep = Math.sqrt(Math.pow(x0-x1,2) + Math.pow(y0-y1,2)) ;
if (oldsep=="") {
oldsep = currsep ;
} else {
var delta = currsep - oldsep ;
if (delta > scale) {zoom+=1;oldsep=currsep;}
if (delta < -scale) {zoom-=1;oldsep=currsep;}
if (zoom < min) zoom = min ;
if (zoom > max) zoom = max ;
txt.SetText(zoom)
} // if oldsep
} // if count
} // OnTouch