您好,下面的代码遇到了身份验证错误的问题。尝试配置设备但未获得任何响应。加载程序也只是关闭。
我尝试使用蓝牙配置设备,但将数据保存到本地却没有任何响应。
08-23 11:58:33.185 2112-2459/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> BAD_AUTHENTICATION. Account: <ELLIDED:743227095>, App: com.android.vending, Service: androidmarket
gai: Long live credential not available.
at gaj.b(:com.google.android.gms@12685008@12.6.85 (020306-197041431):20)
at gaj.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):50)
at fyt.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):38)
at hpk.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):8)
at hpk.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):189)
at hok.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):2)
at hoh.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):17)
at hoh.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):6)
at cyz.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):25)
at cyz.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):82)
at fvp.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):6)
at fvo.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):2)
at fvo.e(:com.google.android.gms@12685008@12.6.85 (020306-197041431):6)
at fvn.a(:com.google.android.gms@12685008@12.6.85 (020306-197041431):1)
at fxk.getAuthToken(:com.google.android.gms@12685008@12.6.85 (020306-197041431):7)
at android.accounts.AbstractAccountAuthenticator$Transport.getAuthToken(AbstractAccountAuthenticator.java:196)
at android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticator.java:113)
at android.os.Binder.transact(Binder.java:380)
at dbf.onTransact(:com.google.android.gms@12685008@12.6.85 (020306-197041431):3)
at android.os.Binder.execTransact(Binder.java:446)
任何人都可以帮助我
@OnClick(R.id.saveConfig)
public void onClick() {
sendCommandToBleService();
}
private void sendCommandToBleService() {
String pollNumber = mPollNumber.getText().toString();
String geoLocation = mGeoLocation.getText().toString();
String luminairePower = mLuminourPower.getText().toString();
String projectName = mProjectName.getText().toString();
String battAh = mBatteryAh.getText().toString();
String pannelWatt = mPannelWatt.getText().toString();
if (TextUtils.isEmpty(pollNumber)) {
Toast.makeText(LightConfigurationActivity.this, R.string.poll_number_blank, Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(geoLocation) || geoLocation.equalsIgnoreCase("SET")) {
Toast.makeText(LightConfigurationActivity.this, R.string.geoLocation_blank, Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(luminairePower) || luminairePower.equalsIgnoreCase("SET")) {
Toast.makeText(LightConfigurationActivity.this, R.string.luminour_power_empty, Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(projectName)) {
Toast.makeText(LightConfigurationActivity.this, R.string.project_name_blank, Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(battAh)) {
Toast.makeText(LightConfigurationActivity.this, R.string.battery_ah_blank, Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(pannelWatt)) {
Toast.makeText(LightConfigurationActivity.this, R.string.pannel_watt_blank, Toast.LENGTH_SHORT).show();
return;
}
makeDefaultValues(pollNumber, geoLocation, luminairePower, projectName, battAh, pannelWatt);
if (battAh.length() == 1) {
battAh = "00" + battAh;
} else if (battAh.length() == 2) {
battAh = "0" + battAh;
}
if (pannelWatt.length() == 1) {
pannelWatt = "00" + pannelWatt;
} else if (pannelWatt.length() == 2) {
pannelWatt = "0" + pannelWatt;
}
sendCommandsToBleService(battAh, pannelWatt);
}
private void resendconfig() {
sendCommandToBleService();
}
private void sendCommandsToBleService(String batAhValue, String pannellwattValue) {
showProgressDialog();
String command = mSolarController.generatePacket("pol " + mPollNumber.getText().toString(), "00");
String longCmd = mPref.getString(Constants.LAT_COMMAND, "");
String latCmd = mPref.getString(Constants.LONG_COMMAND, "");
String firstTimerCmd = mPref.getString(Constants.TIMER_ONE_CMD, "");
String secondTimerCmd = mPref.getString(Constants.TIMER_TWO_CMD, "");
String projectCmd = mSolarController.generatePacket("pro " + mProjectName.getText().toString(), "00");
String batAh = mSolarController.generatePacket("battah " + batAhValue, "00");
String pannelWatt = mSolarController.generatePacket("panelw " + pannellwattValue, "00");
String wattCommand = mPref.getString(Constants.BRIGHTNESS_CMD, "");
String luminaryWatt = mPref.getString(Constants.LUMINOURE_WATT_COMMAND, "");
mBleService.addCommandToQue(command);
mBleService.addCommandToQue(longCmd);
mBleService.addCommandToQue(latCmd);
mBleService.addCommandToQue(firstTimerCmd);
mBleService.addCommandToQue(secondTimerCmd);
mBleService.addCommandToQue(projectCmd);
mBleService.addCommandToQue(batAh);
mBleService.addCommandToQue(pannelWatt);
mBleService.addCommandToQue(wattCommand);
mBleService.addCommandToQue(luminaryWatt);
mBleService.sendCommandToBle();
}