1、二维码、条码扫描 //点击扫描二维码
public override void AfterButtonClick(AfterButtonClickEventArgs e)
{
this.View.CodeScan(); //调用二维码、条码扫描
}
//扫描结果返回,参数e为二维码、条码结果字符串
public override void AfterCodeScan(string e)
{
this.Model.SetValue("FCode", e);
}
2、移动客户端地图定位
public override void AfterButtonClick(AfterButtonClickEventArgs e)
{
this.View.LocateMobileClient(LocationProvider.LBS_PROVIDER, true); //调用定位服务
}
//定位结果返回,参数e为位置信息
public override void AfterMobileClientLocated(MobileClientLocatedEventArgs e)
{
//PlunInHelper.SaveSignInInfo(this.Context, e.Latitude, e.Longitude, e.Desc);
}
3、打开指定URL地址
JSONArray array = new JSONArray();
JSONObject obj = new JSONObject();
obj.Put("url", "http://www.kingdee.com");
obj.Put("title", "title");
obj.Put("urltitle", "urltitle");
array.Add(obj);
this.View.AddAction("openUrlWindow", array);
4、打电话
this.View.SendCall("13800000000");
5、发起云之家沟通
//单个用户发起沟通
JSONObject config = new JSONObject();
config.Put("openId", openIds[0]);
this.View.AddAction("chatWithXT", config);
//发起群聊
JSONObject config = new JSONObject();
config.Put("shareType", "1");
config.Put("text", "采购xxxxxx");
config.Put("appId", "10037");
config.Put("appName", "业务审批";
config.Put("ignore", new List<string>());
config.Put("selected", openIds);
this.View.AddAction("shareWithXT", config);
//获取openId接口:
UserXunTongServiceHelper.GetXunTongOpenIds(Context ctx, List<string> userIds);
6、定时器的应用
this.View.StartTimer("myTimer", 5); //启用一个定时器
//计时器的TimerTick事件
public override void TimerTick(string timerkey)
{
this.View.ShowMessage(timerkey); //timerkey = "myTimer",timerkey是启用定时器时指定的Key
this.View.StopTimer(timerkey); //停止计时器
}
this.View.StopTimer("myTimer"); //停止指定标识定时器
7、设置移动列表指定行、指定控件的属性值(python示例)
config = {'listKey':'FMOBILELISTVIEWENTITY','key':'FIMG','row':3,'property':'backgroundUrl','value':'bluePoint.png'};
this.View.AddAction("setListControlProperty",config);
推荐阅读