Skip to content Skip to sidebar Skip to footer

Display Result Of Json Data In Textview Of Android

I am having one problem while displaying data in android app.This is my php.I have edited now to shorten the code. if($imei_no!='' && $app_auid!='') { //chk q

Solution 1:

@user6588225

so your sending Json with Success message

so rather than using == try to use contains

so inside your onPostExecute(String s)

@OverrideprotectedvoidonPostExecute(String s) {
     super.onPostExecute(s);
     loading.dismiss();
     if(s.contains("Success")){
         Intentintent=newIntent(IMEI_Val.this, CapturePhoto.class);
         // intent.putExtra(USER_NAME,username);
         startActivity(intent);
     }
     else{
       Toast.makeText(IMEI_Val.this, s, Toast.LENGTH_LONG).show();
       Log.d("Tag Name", "Log Message");
     }
}

Solution 2:

use if("Success".equalsIgnoreCase(s)) insted of if(s=="Success")

Post a Comment for "Display Result Of Json Data In Textview Of Android"