|
|
@ -294,6 +294,7 @@ public class MainSettingsActivity extends PreferenceCompatActivity { |
|
|
|
protected void onServerBarcodeScanHandled(String[] qrResult) { |
|
|
|
protected void onServerBarcodeScanHandled(String[] qrResult) { |
|
|
|
final String server = qrResult[0]; |
|
|
|
final String server = qrResult[0]; |
|
|
|
final String token = qrResult[2]; |
|
|
|
final String token = qrResult[2]; |
|
|
|
|
|
|
|
final String name = server.replace(".xirvik.com", ""); |
|
|
|
|
|
|
|
|
|
|
|
new XirvikSharedSettingsActivity.RetrieveXirvikAutoConfTask(server, "", "", token) { |
|
|
|
new XirvikSharedSettingsActivity.RetrieveXirvikAutoConfTask(server, "", "", token) { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -304,17 +305,17 @@ public class MainSettingsActivity extends PreferenceCompatActivity { |
|
|
|
switch (qrResult[1]) { |
|
|
|
switch (qrResult[1]) { |
|
|
|
case "P": |
|
|
|
case "P": |
|
|
|
XirvikDediSettings xirvikDediSettings = new XirvikDediSettings(); |
|
|
|
XirvikDediSettings xirvikDediSettings = new XirvikDediSettings(); |
|
|
|
xirvikDediSettings.saveServerSetting(getApplicationContext(), server, token); |
|
|
|
xirvikDediSettings.saveServerSetting(getApplicationContext(), server, token, name); |
|
|
|
onResume(); |
|
|
|
onResume(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "N": |
|
|
|
case "N": |
|
|
|
XirvikSemiSettings xirvikSemiSettings = new XirvikSemiSettings(); |
|
|
|
XirvikSemiSettings xirvikSemiSettings = new XirvikSemiSettings(); |
|
|
|
xirvikSemiSettings.saveServerSetting(getApplicationContext(), server, token); |
|
|
|
xirvikSemiSettings.saveServerSetting(getApplicationContext(), server, token, name); |
|
|
|
onResume(); |
|
|
|
onResume(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "RG": |
|
|
|
case "RG": |
|
|
|
XirvikSharedSettings xirvikSharedSettings = new XirvikSharedSettings(); |
|
|
|
XirvikSharedSettings xirvikSharedSettings = new XirvikSharedSettings(); |
|
|
|
xirvikSharedSettings.saveServerSetting(getApplicationContext(), server, token, result); |
|
|
|
xirvikSharedSettings.saveServerSetting(getApplicationContext(), server, token, result, name); |
|
|
|
onResume(); |
|
|
|
onResume(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|