Java Code Examples for com.gizwits.gizwifisdk.enumration.GizWifiErrorCode#GIZ_SDK_SUCCESS
The following examples show how to use
com.gizwits.gizwifisdk.enumration.GizWifiErrorCode#GIZ_SDK_SUCCESS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GosDeviceListActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 6 votes |
@Override protected void didSetSubscribe(GizWifiErrorCode result, GizWifiDevice device, boolean isSubscribed) { // TODO 控制页面跳转 progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) { msg.what = TOCONTROL; msg.obj = device; } else { if (device.isBind()) { msg.what = TOAST; // String setSubscribeFail = (String) // getText(R.string.setsubscribe_failed); msg.obj = toastError(result);// setSubscribeFail + "\n" + arg0; } } handler.sendMessage(msg); }
Example 2
Source File: GosDeviceListActivity.java From Gizwits-SmartBuld_Android with MIT License | 6 votes |
protected void didUserLogin(GizWifiErrorCode result, java.lang.String uid, java.lang.String token) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) { loginStatus = 2; this.uid = uid; this.token = token; spf.edit().putString("Uid", this.uid).commit(); spf.edit().putString("Token", this.token).commit(); handler.sendEmptyMessage(GETLIST); // TODO 绑定推送 GosPushManager.pushBindService(token); } else { loginStatus = 0; tryUserLoginAnonymous(); } }
Example 3
Source File: GosForgetPasswordActivity.java From Gizwits-SmartBuld_Android with MIT License | 6 votes |
/** 重置密码回调 */ @Override public void didChangeUserPassword(GizWifiErrorCode result) { progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String resetFailed = (String) getText(R.string.reset_failed); msg.what = handler_key.TOAST.ordinal(); msg.obj = toastError(result);// resetFailed + "\n" + errorMessage; handler.sendMessage(msg); } else { msg.what = handler_key.TOAST.ordinal(); String resetSuccessful = (String) getText(R.string.reset_successful); msg.obj = resetSuccessful; handler.sendMessage(msg); } }
Example 4
Source File: GosAirlinkConfigCountdownActivity.java From gokit-android with MIT License | 6 votes |
/** * 设备配置回调 * * @param result * 错误码 * @param mac * MAC * @param did * DID * @param productKey * PK */ protected void didSetDeviceOnboarding(GizWifiErrorCode result, String mac, String did, String productKey) { if (GizWifiErrorCode.GIZ_SDK_DEVICE_CONFIG_IS_RUNNING == result) { return; } if (timer != null) { timer.cancel(); } Message message = new Message(); if (result == GizWifiErrorCode.GIZ_SDK_SUCCESS) { message.what = handler_key.SUCCESSFUL.ordinal(); } else { message.what = handler_key.FAILED.ordinal(); message.obj = toastError(result); } Log.i("Apptest", result.toString()); handler.sendMessage(message); }
Example 5
Source File: GosDeviceListActivity.java From gokit-android with MIT License | 6 votes |
protected void didUserLogin(GizWifiErrorCode result, java.lang.String uid, java.lang.String token) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) { loginStatus = 2; this.uid = uid; this.token = token; spf.edit().putString("Uid", this.uid).commit(); spf.edit().putString("Token", this.token).commit(); handler.sendEmptyMessage(GETLIST); // TODO 绑定推送 GosPushManager.pushBindService(token); } else { loginStatus = 0; if(GosDeploy.setAnonymousLogin()){ tryUserLoginAnonymous(); } } }
Example 6
Source File: GosForgetPasswordActivity.java From Gizwits-SmartBuld_Android with MIT License | 6 votes |
/** 手机验证码回调 */ @Override protected void didRequestSendPhoneSMSCode(GizWifiErrorCode result, String token) { progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String sendFailed = (String) getText(R.string.send_failed); msg.what = handler_key.TOAST.ordinal(); msg.obj = toastError(result);// sendFailed + "\n" + // errorMessage;toastError(errorCode) handler.sendMessage(msg); } else { handler.sendEmptyMessage(handler_key.SENDSUCCESSFUL.ordinal()); msg.what = handler_key.TOAST.ordinal(); String sendSuccessful = (String) getText(R.string.send_successful); msg.obj = sendSuccessful; handler.sendMessage(msg); } }
Example 7
Source File: GosForgetPasswordActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 6 votes |
/** 重置密码回调 */ @Override public void didChangeUserPassword(GizWifiErrorCode result) { progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String resetFailed = (String) getText(R.string.reset_failed); msg.what = handler_key.TOAST.ordinal(); msg.obj = toastError(result);// resetFailed + "\n" + errorMessage; handler.sendMessage(msg); } else { msg.what = handler_key.TOAST.ordinal(); String resetSuccessful = (String) getText(R.string.reset_successful); msg.obj = resetSuccessful; handler.sendMessage(msg); } }
Example 8
Source File: GosDeviceListActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 6 votes |
protected void didUserLogin(GizWifiErrorCode result, java.lang.String uid, java.lang.String token) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS == result) { loginStatus = 2; this.uid = uid; this.token = token; spf.edit().putString("Uid", this.uid).commit(); spf.edit().putString("Token", this.token).commit(); handler.sendEmptyMessage(GETLIST); // TODO 绑定推送 GosPushManager.pushBindService(token); } else { loginStatus = 0; if (GosDeploy.setAnonymousLogin()) { tryUserLoginAnonymous(); } } }
Example 9
Source File: GosForgetPasswordActivity.java From gokit-android with MIT License | 6 votes |
/** 手机验证码回调 */ @Override protected void didRequestSendPhoneSMSCode(GizWifiErrorCode result, String token) { progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String sendFailed = (String) getText(R.string.send_failed); msg.what = handler_key.TOAST.ordinal(); msg.obj = toastError(result);// sendFailed + "\n" + // errorMessage;toastError(errorCode) handler.sendMessage(msg); } else { handler.sendEmptyMessage(handler_key.SENDSUCCESSFUL.ordinal()); msg.what = handler_key.TOAST.ordinal(); String sendSuccessful = (String) getText(R.string.send_successful); msg.obj = sendSuccessful; handler.sendMessage(msg); } }
Example 10
Source File: GosForgetPasswordActivity.java From gokit-android with MIT License | 6 votes |
/** 重置密码回调 */ @Override public void didChangeUserPassword(GizWifiErrorCode result) { progressDialog.cancel(); Message msg = new Message(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String resetFailed = (String) getText(R.string.reset_failed); msg.what = handler_key.TOAST.ordinal(); msg.obj = toastError(result);// resetFailed + "\n" + errorMessage; handler.sendMessage(msg); } else { msg.what = handler_key.TOAST.ordinal(); String resetSuccessful = (String) getText(R.string.reset_successful); msg.obj = resetSuccessful; handler.sendMessage(msg); } }
Example 11
Source File: GosUserLoginActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 5 votes |
/** * 设置云端服务回调 */ protected void didGetCurrentCloudService(GizWifiErrorCode result, java.util.concurrent.ConcurrentHashMap<String, String> cloudServiceInfo) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Toast.makeText(this, toastError(result), toastTime).show(); } }
Example 12
Source File: GosApplication.java From Gizwits-SmartBuld_Android with MIT License | 5 votes |
public void didGetCurrentCloudService(GizWifiErrorCode result, java.util.concurrent.ConcurrentHashMap<String, String> cloudServiceInfo) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Log.e("Apptest", "CloudService Error: " + result.toString()); } }
Example 13
Source File: GosUserLoginActivity.java From gokit-android with MIT License | 5 votes |
/** * 解绑推送回调 * * @param result */ protected void didChannelIDUnBind(GizWifiErrorCode result) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Toast.makeText(this, toastError(result), toastTime).show(); } Log.i("Apptest", "UnBind:" + result.toString()); }
Example 14
Source File: GosEditDeviceDelayActivity.java From Gizwits-SmartBuld_Android with MIT License | 5 votes |
@Override protected void didReceiveData(GizWifiErrorCode result, GizWifiDevice device, ConcurrentHashMap<String, Object> dataMap, int sn) { super.didReceiveData(result, device, dataMap, sn); if (result == GizWifiErrorCode.GIZ_SDK_SUCCESS) { deviceDataMap = dataMap; getDataFromDateMap(); } }
Example 15
Source File: GosDeviceListActivity.java From gokit-android with MIT License | 5 votes |
protected void didUnbindDevice(GizWifiErrorCode result, java.lang.String did) { progressDialog.cancel(); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { // String unBoundFailed = (String) getText(R.string.unbound_failed); Toast.makeText(this, toastError(result), 2000).show(); } }
Example 16
Source File: GosUserLoginActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 5 votes |
/** * 解绑推送回调 * * @param result */ protected void didChannelIDUnBind(GizWifiErrorCode result) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Toast.makeText(this, toastError(result), toastTime).show(); } Log.i("Apptest", "UnBind:" + result.toString()); }
Example 17
Source File: GosUserLoginActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 5 votes |
/** * 用户登录回调 */ @Override protected void didUserLogin(GizWifiErrorCode result, String uid, String token) { progressDialog.cancel(); Log.i("Apptest", GosDeviceListActivity.loginStatus + "\t" + "User"); if (GosDeviceListActivity.loginStatus == 4 || GosDeviceListActivity.loginStatus == 3) { return; } Log.i("Apptest", GosDeviceListActivity.loginStatus + "\t" + "UserLogin"); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) {// 登录失败 Toast.makeText(GosUserLoginActivity.this, toastError(result), toastTime).show(); } else {// 登录成功 GosDeviceListActivity.loginStatus = 1; Toast.makeText(GosUserLoginActivity.this, R.string.toast_login_successful, toastTime).show(); // TODO 绑定推送 GosPushManager.pushBindService(token); if (!TextUtils.isEmpty(etName.getText().toString()) && !TextUtils.isEmpty(etPsw.getText().toString()) && TextUtils.isEmpty(spf.getString("thirdUid", ""))) { spf.edit().putString("UserName", etName.getText().toString()).commit(); spf.edit().putString("PassWord", etPsw.getText().toString()).commit(); } spf.edit().putString("Uid", uid).commit(); spf.edit().putString("Token", token).commit(); intent = new Intent(GosUserLoginActivity.this, GosMainActivity.class); intent.putExtra("ThredLogin", true); startActivity(intent); } }
Example 18
Source File: GosUserLoginActivity.java From gokit-android with MIT License | 5 votes |
/** * 设置云端服务回调 */ protected void didGetCurrentCloudService(GizWifiErrorCode result, java.util.concurrent.ConcurrentHashMap<String, String> cloudServiceInfo) { if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Toast.makeText(this, toastError(result), toastTime).show(); } }
Example 19
Source File: GosDeviceListActivity.java From Gizwits-SmartBuld_Android with MIT License | 5 votes |
/** * 设备绑定回调 * * @param result * @param did */ protected void didBindDevice(GizWifiErrorCode result, java.lang.String did) { progressDialog.cancel(); if (result != GizWifiErrorCode.GIZ_SDK_SUCCESS) { Toast.makeText(this, toastError(result), 2000).show(); } else { Toast.makeText(this, R.string.add_successful, 2000).show(); } }
Example 20
Source File: GosDeviceListActivity.java From gokit-android with MIT License | 5 votes |
/** * 推送绑定回调 * * @param result */ @Override protected void didChannelIDBind(GizWifiErrorCode result) { Log.i("Apptest", result.toString()); if (GizWifiErrorCode.GIZ_SDK_SUCCESS != result) { Toast.makeText(this, toastError(result), 2000).show(); } }