我们尝试了一切来完成特定活动,但未能这样做.代码运行没有任何错误或警告只是无法完成活动.我们尝试了stackoverflow中的每个解决方案以及其他论坛.需要一个解释的解决方案.
public void HttpSmsRequest(final String Phone){
final ProgressDialog pDialog = new ProgressDialog(this);
pDialog.setMessage("Loading...";
pDialog.show();
Map<String, String> jsonParams = new HashMap<String, String>();
// jsonParams.put("param1", youParameter);
jsonParams.put("Phone", Phone);
//jsonParams.put("rememberMe", "true";
JsonObjectRequest myRequest = new JsonObjectRequest(
Request.Method.POST,
AppGlobal.host+"PhoneVerification/sendSms",
new JSONObject(jsonParams),
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try
{
Log.v("Success", "success: " + response.toString());
//MessageBox.Show(ProfileInfoActivity.this, "Response: " + response.toString());
pDialog.dismiss();
JSONObject obj=new JSONObject(response.toString());
// String ID=obj.getString("ID";
String Flag=obj.getString("Flag";
String Message=obj.getString("Message";
// Context context = getApplicationContext();
//
/// appPrefs.setUserIdentity(Integer.parseInt(ID)); …Run Code Online (Sandbox Code Playgroud)