|
我在模拟器上运行下载的Android studio程序运行在此处函数没有返回,是怎么回事,代码如下
private void init(Context c) {
gosDeploy = new GosDeploy(c);
String AppID = GosDeploy.setAppID();
String AppSecret = GosDeploy.setAppSecret();
if (TextUtils.isEmpty(AppID) || AppID.contains("your_app_id") || TextUtils.isEmpty(AppSecret)
|| AppSecret.contains("your_app_secret")) {
String AppID_Toast = c.getString(R.string.AppID_Toast);
if (flag == 0) {
Toast.makeText(c, AppID_Toast, Toast.LENGTH_LONG).show();
}
flag++;
} else {
// 启动SDK
ConcurrentHashMap<String, String> serverMap = new ConcurrentHashMap<String, String>();
serverMap.put("openAPIInfo", TextUtils.isEmpty((String) GosDeploy.infoMap.get("openAPI_URL"))
? "api.gizwits.com" : (String) GosDeploy.infoMap.get("openAPI_URL"));
serverMap.put("siteInfo", TextUtils.isEmpty((String) GosDeploy.infoMap.get("site_URL")) ? "site.gizwits.com"
: (String) GosDeploy.infoMap.get("site_URL"));
serverMap.put("pushInfo", (String) GosDeploy.infoMap.get("push_URL"));
//GizWifiSDK.sharedInstance().startWithAppID(c, AppID, GosDeploy.setProductKeyList(), serverMap);
//此处没有返回,程序无法进入到hand.sendEmptyMessageDelayed(SETCLOUD, 3000);
GizWifiSDK.sharedInstance().startWithAppID(c, AppID, AppSecret, GosDeploy.setProductKeyList(), serverMap,false);
}
hand.sendEmptyMessageDelayed(SETCLOUD, 3000);
}
|
|