function getVariableType(variable) { return Object.prototype.toString.call(variable);} 判断变量是不是函数 function isFunctionType(variable) { let variableType = getVariableType(variable); if (variableType === "[object Function]") { return true; } else { return false; }}...
autojs自定义组件 https://www.yuque.com/yashujs/bfug6u/rbho2n "ui";importClass(android.view.View);var MyView = (function () { //继承至ui.Widget util.extend(MyView, ui.Widget); function MyView() { ui.Widget.call(this); } MyView.prototype.render = function () {...
调用intent拨打电话 functioncall(context,id, telNum){//idstarts from zero to one importClass(android.content.Intent);importClass(android.net.Uri);importClass(android.content.Context);importClass(android.telecom.TelecomManager);lettelecomManager=context.getSystemService(Context.TELECOM_SERVICE);if(telecomManager!
调用intent拨打电话 functioncall(context,id, telNum){ //idstarts from zero to one importClass(android.content.Intent); importClass(android.net.Uri); importClass(android.content.Context); importClass(android.telecom.TelecomManager);lettelecomManager = context.getSystemService(Context.TELECOM_SERVICE);if(te...
function replacepos(text,start,stop,replacetext) { mystr = text.substring(0,start)+replacetext+text.substring(stop+1); return mystr; } 调用系统电话模块 调用intent拨打电话 function call(context,id, telNum){ // id starts from zero to one ...
importClass(android.net.Uri);importClass(android.os.Build);function isSimulator() { let url = "tel:" + "123456"; let intent = new Intent(); intent.setData(Uri.parse(url)); intent.setAction(Intent.ACTION_DIAL); // 是否可以处理跳转到拨号的 Intent let canCallPhone = ...
function showRect(left, top, right, bottom, t) { let obj = getFloatingWindow();obj.paint.setStrokeWidth(30);obj.canvas.drawRect(left, top, right, bottom, obj.paint);releaseResources(obj, t);} 2. 显示点 function shwPoint(x, y, t) { let obj = getFloatingWindow();obj.paint.set...
callback{Function} 当定时器到点时要调用的函数。 delay{number} 调用 callback 之前要等待的毫秒数。 ...args{any} 当调用 callback 时要传入的可选参数。 var i = 0; setInterval(function(){ i++; toast(i + "秒"); if(i == 19999){ ...
callback.click(()=>{ dialogs.confirm("要弹出输入框吗?", "", function(b){ if(b){ dialogs.rawInput("输入", "", function(str){ alert("您输入的是:" + str); }); }else{ ui.finish(); } }); }); ui.promise.click(()=>{ dialogs.confirm("要弹出输入框吗") .then(function(b)...
readString(); } var show = function (callback) { var dialog_win = floaty.rawWindow( <vertical> 返回 <android.view.SurfaceView id="surfaceView" /> </vertical> ); dialog_win.setSize(device.width/2, device.height/2); dialog_win.setPosition(device.width/4, device.height/4); dialog_win....