com.gizwits.opensource.appkit.DeviceModule.GosDeviceListActivity Java Examples
The following examples show how to use
com.gizwits.opensource.appkit.DeviceModule.GosDeviceListActivity.
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: GosUserManager.java From GOpenSource_AppKit_Android_AS with MIT License | 6 votes |
private void logoutToClean() { GosPushManager.pushUnBindService(spf.getString("Token", "")); spf.edit().putString("UserName", "").commit(); isclean = true; spf.edit().putString("PassWord", "").commit(); spf.edit().putString("Uid", "").commit(); spf.edit().putString("Token", "").commit(); spf.edit().putString("thirdUid", "").commit(); if (GosDeviceListActivity.loginStatus == 1) { GosDeviceListActivity.loginStatus = 0; } else { GosDeviceListActivity.loginStatus = 4; } }
Example #2
Source File: GosUserLoginActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 6 votes |
/** 注销函数 */ void logoutToClean() { spf.edit().putString("UserName", "").commit(); spf.edit().putString("PassWord", "").commit(); spf.edit().putString("Uid", "").commit(); spf.edit().putString("thirdUid", "").commit(); spf.edit().putString("Token", "").commit(); if (GosDeviceListActivity.loginStatus == 1) { GosDeviceListActivity.loginStatus = 0; } else { GosDeviceListActivity.loginStatus = 4; } }
Example #3
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 #4
Source File: GosUserLoginActivity.java From Gizwits-SmartBuld_Android 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), 2000).show(); } else {// 登录成功 GosDeviceListActivity.loginStatus = 1; Toast.makeText(GosUserLoginActivity.this, R.string.toast_login_successful, 2000).show(); // TODO 绑定推送 GosPushManager.pushBindService(token); if (!TextUtils.isEmpty(etName.getText().toString()) && !TextUtils.isEmpty(etPsw.getText().toString())) { 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, GosDeviceListActivity.class); intent.putExtra("ThredLogin", true); startActivity(intent); } }
Example #5
Source File: GosUserLoginActivity.java From gokit-android 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())) { 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, GosDeviceListActivity.class); intent.putExtra("ThredLogin", true); startActivity(intent); } }
Example #6
Source File: GosDeviceMoreActivity.java From Gizwits-SmartBuld_Android with MIT License | 4 votes |
private void backToDeviceList() { Intent intent = new Intent(this, GosDeviceListActivity.class); // 关闭在GosDeviceListActivity后面所有打开的Activity intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); }
Example #7
Source File: GosEditDeviceAliasActivity.java From Gizwits-SmartBuld_Android with MIT License | 4 votes |
private void backToDeviceList() { Intent intent = new Intent(this, GosDeviceListActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); }