protected void onPostExecute(JSONObject json)
{
if (pDialog != null && pDialog.isShowing())
{
pDialog.dismiss();
}
if (json != null)
{
//Toast.makeText(Home.this, json.toString(), Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(),"Login successfully !!!!",Toast.LENGTH_SHORT).show();
//startActivity(new Intent(Home.this, NewWelcome.class));
}
else
{
Toast.makeText(getApplicationContext(),"Wrong user and password",Toast.LENGTH_SHORT).show();
}
}
私は "JSONObject json"のデータをユーザー名のように読み込み、それを変数stringに格納したいと思います! JSONオブジェクトjsonパーサからデータを読み込む方法
"{
"0": 8,
"S_No": 8,
"1": "Sachin Palve",
"User_name": "Sachin Palve",
"2": "[email protected]",
"Email_id": "[email protected]",
"3": "12345",
"Password": "12345",
"4": "Pune",
"Place": "Pune",
"5": "9860629293",
"Contact_no": "9860629293",
"6": "yes",
"TC_approve": "yes",
"7": "SPU93008",
"User_id": "SPU93008"
}"