|
|
|
|
23
|
}
|
23
|
}
|
24
|
storageCallback("getDate",callback);
|
24
|
storageCallback("getDate",callback);
|
25
|
execute("getDate", [date,format],err);
|
25
|
execute("getDate", [date,format],err);
|
|
|
26
|
},getContactsView:function(callback,data,setting,err){
|
|
|
27
|
if(data==undefined){
|
|
|
28
|
data = new Wade.DataMap();
|
|
|
29
|
}
|
|
|
30
|
if(setting==undefined){
|
|
|
31
|
setting = new Wade.DataMap();
|
|
|
32
|
}
|
|
|
33
|
storageCallback("getContactsView",callback);
|
|
|
34
|
execute("getContactsView", [data.toString(),setting.toString()],err);
|
26
|
},getPhoto:function(callback,type,err){//获取照片
|
35
|
},getPhoto:function(callback,type,err){//获取照片
|
27
|
if(type==undefined){
|
36
|
if(type==undefined){
|
28
|
type = 1;//0-Base64编码的字符串 1- 文件路径
|
37
|
type = 1;//0-Base64编码的字符串 1- 文件路径
|
|
|
|
|
53
|
execute("shock", [time],err);
|
62
|
execute("shock", [time],err);
|
54
|
},call:function(sn,autoCall,err){
|
63
|
},call:function(sn,autoCall,err){
|
55
|
if(autoCall==undefined){
|
64
|
if(autoCall==undefined){
|
56
|
autoCall=1;//0-跳转至拨打界面,1-直接拨打
|
|
|
|
|
65
|
autoCall = false;// false-跳转至拨打界面,true-直接拨打
|
57
|
}
|
66
|
}
|
58
|
execute("call", [sn,autoCall],err);
|
67
|
execute("call", [sn,autoCall],err);
|
59
|
},sms:function(sn,msg,autoSms,err){
|
68
|
},sms:function(sn,msg,autoSms,err){
|
60
|
if(autoSms==undefined){
|
69
|
if(autoSms==undefined){
|
61
|
autoSms=0;//0-跳转至短信界面,1-直接短信
|
|
|
|
|
70
|
autoSms = false;// false-跳转至短信界面,true-直接短信
|
62
|
}
|
71
|
}
|
63
|
execute("sms", [sn,msg,autoSms],err);
|
72
|
execute("sms", [sn,msg,autoSms],err);
|
64
|
},openApp:function(appId,urlParams,installUrl,err){
|
73
|
},openApp:function(appId,urlParams,installUrl,err){
|
|
|
|
|
185
|
//将日志输出至LogCat控制台(异步)
|
194
|
//将日志输出至LogCat控制台(异步)
|
186
|
execute("logCat",[msg,title],err);
|
195
|
execute("logCat",[msg,title],err);
|
187
|
},execSQL:function(dbName,sql,bindArgs,callback,err){
|
196
|
},execSQL:function(dbName,sql,bindArgs,callback,err){
|
|
|
197
|
if(bindArgs==undefined){
|
|
|
198
|
bindArgs = new Array();
|
|
|
199
|
}
|
188
|
storageCallback("execSQL",callback);
|
200
|
storageCallback("execSQL",callback);
|
189
|
execute("execSQL",[dbName,sql,bindArgs],err);
|
201
|
execute("execSQL",[dbName,sql,bindArgs],err);
|
190
|
},insert:function(dbName,table,datas,callback,err){
|
202
|
},insert:function(dbName,table,datas,callback,err){
|
|
|
203
|
if(datas==undefined){
|
|
|
204
|
datas = new Wade.DataMap();
|
|
|
205
|
}
|
191
|
storageCallback("insert",callback);
|
206
|
storageCallback("insert",callback);
|
192
|
execute("insert",[dbName,table,datas],err);
|
|
|
|
|
207
|
execute("insert",[dbName,table,datas.toString()],err);
|
193
|
},delete:function(dbName,table,datas,callback,err){
|
208
|
},delete:function(dbName,table,datas,callback,err){
|
|
|
209
|
if(datas==undefined){
|
|
|
210
|
datas = new Wade.DataMap();
|
|
|
211
|
}
|
194
|
storageCallback("delete",callback);
|
212
|
storageCallback("delete",callback);
|
195
|
execute("delete",[dbName,table,datas],err);
|
|
|
|
|
213
|
execute("delete",[dbName,table,datas.toString()],err);
|
196
|
},update:function(dbName,table,datas,conds,callback,err){
|
214
|
},update:function(dbName,table,datas,conds,callback,err){
|
|
|
215
|
if(datas==undefined){
|
|
|
216
|
datas = new Wade.DataMap();
|
|
|
217
|
}
|
|
|
218
|
if(conds==undefined){
|
|
|
219
|
conds = new Wade.DataMap();
|
|
|
220
|
}
|
197
|
storageCallback("update",callback);
|
221
|
storageCallback("update",callback);
|
198
|
execute("update",[dbName,table,datas,conds],err);
|
|
|
|
|
222
|
execute("update",[dbName,table,datas.toString(),conds.toString()],err);
|
199
|
},select:function(dbName,table,columns,conds,callback,err){
|
223
|
},select:function(dbName,table,columns,conds,callback,err){
|
|
|
224
|
if(columns==undefined){
|
|
|
225
|
columns = new Array();
|
|
|
226
|
}
|
|
|
227
|
if(conds==undefined){
|
|
|
228
|
conds = new Wade.DataMap();
|
|
|
229
|
}
|
200
|
storageCallback("select",callback);
|
230
|
storageCallback("select",callback);
|
201
|
execute("select",[dbName,table,columns,conds],err);
|
|
|
|
|
231
|
execute("select",[dbName,table,columns,conds.toString()],err);
|
202
|
},selectFirst:function(dbName,table,columns,conds,callback,err){
|
232
|
},selectFirst:function(dbName,table,columns,conds,callback,err){
|
|
|
233
|
if(columns==undefined){
|
|
|
234
|
columns = new Array();
|
|
|
235
|
}
|
|
|
236
|
if(conds==undefined){
|
|
|
237
|
conds = new Wade.DataMap();
|
|
|
238
|
}
|
203
|
storageCallback("selectFirst",callback);
|
239
|
storageCallback("selectFirst",callback);
|
204
|
execute("selectFirst",[dbName,table,columns,conds],err);
|
|
|
|
|
240
|
execute("selectFirst",[dbName,table,columns,conds.toString()],err);
|
205
|
},registerForPush:function(account,callback,err){
|
241
|
},registerForPush:function(account,callback,err){
|
206
|
storageCallback("registerForPush",callback);
|
242
|
storageCallback("registerForPush",callback);
|
207
|
execute("registerForPush",[account],err);
|
243
|
execute("registerForPush",[account],err);
|
|
|
|
|
211
|
},sendText:function(account,content,callback,err){
|
247
|
},sendText:function(account,content,callback,err){
|
212
|
storageCallback("sendText",callback);
|
248
|
storageCallback("sendText",callback);
|
213
|
execute("sendText", [account,content],err);
|
249
|
execute("sendText", [account,content],err);
|
214
|
},setCallbackForPush:function(callbackName){
|
|
|
215
|
execute("setCallbackForPush", [callbackName]);
|
|
|
216
|
},openBrowser:function(url,err){
|
|
|
217
|
execute("openBrowser",[url],err);
|
|
|
|
|
250
|
},setCallbackForPush:function(callback){
|
|
|
251
|
execute("setCallbackForPush", [callback]);
|
|
|
252
|
},registerForPushWithYunba:function(account,callback,err){
|
|
|
253
|
storageCallback("registerForPushWithYunba",callback);
|
|
|
254
|
execute("registerForPushWithYunba",[account],err);
|
|
|
255
|
},unregisterForPushWithYunba:function(callback){
|
|
|
256
|
storageCallback("unregisterForPushWithYunba",callback);
|
|
|
257
|
execute("unregisterForPushWithYunba", []);
|
|
|
258
|
},sendTextWithYunba:function(account,content,callback,err){
|
|
|
259
|
storageCallback("sendTextWithYunba",callback);
|
|
|
260
|
execute("sendTextWithYunba", [account,content],err);
|
|
|
261
|
},setCallbackForPushWithYunba:function(callback){
|
|
|
262
|
execute("setCallbackForPushWithYunba", [callback]);
|
|
|
263
|
},aliPay:function(tradeNo,subject,body,price,callback,err){
|
|
|
264
|
storageCallback("aliPay",callback);
|
|
|
265
|
execute("aliPay",[tradeNo,subject,body,price],err);
|
|
|
266
|
},uploadWithServlet:function(filePath,dataAction,param,callback,err){
|
|
|
267
|
if(typeof(filePath)=="string"){
|
|
|
268
|
filePath = [filePath];
|
|
|
269
|
}
|
|
|
270
|
storageCallback("uploadWithServlet",callback);
|
|
|
271
|
execute("uploadWithServlet",[filePath,dataAction,param],err);
|
|
|
272
|
},downloadWithServlet:function(savePath,dataAction,param,callback,err){
|
|
|
273
|
storageCallback("downloadWithServlet",callback);
|
|
|
274
|
execute("downloadWithServlet",[savePath,dataAction,param],err);
|
|
|
275
|
},uploadFile:function(filePath,servletUrl,callback,err){
|
|
|
276
|
storageCallback("uploadFile",callback);
|
|
|
277
|
execute("uploadFile",[filePath,servletUrl],err);
|
|
|
278
|
},downloadFile:function(savePath,servletUrl,callback,err){
|
|
|
279
|
storageCallback("downloadFile",callback);
|
|
|
280
|
execute("downloadFile",[savePath,servletUrl],err);
|
|
|
281
|
},recordVideo:function(callback,compressRatio,timeLimit,err){
|
|
|
282
|
storageCallback("recordVideo",callback);
|
|
|
283
|
execute("recordVideo",[compressRatio,timeLimit],err);
|
|
|
284
|
},playVideo:function(videoPath,callback,err){
|
|
|
285
|
storageCallback("playVideo",callback);
|
|
|
286
|
execute("playVideo",[videoPath],err);
|
|
|
287
|
},getContacts:function(callback,err){
|
|
|
288
|
storageCallback("getContacts",callback);
|
|
|
289
|
execute("getContacts",[], err);
|
218
|
}
|
290
|
}
|
219
|
};
|
291
|
};
|
220
|
})();
|
292
|
})();
|