title: How to get the data from server and upload data to server using Json
body: <p>How to get the data from server and upload data to server using JSON? 
  please tell me.</p>
  
  <p>This is QRActivity------------------------------------------------</p>
  
  <pre><code> final View.OnClickListener listener = new View.OnClickListener() {
  
          @Override
          public
          void onClick(View v) {
              btnSearch.setClickable(true);
  
  
  
              // Server call with record_id
     //DistributionDetails detDis &lt;-- response json object from server call
  
  
      QrActivityViewDetails detDis = new 
        QrActivityViewDetails(1002,"NORORG147530","No2,abcd Road , Colombo 03","0112233456");
  
               Intent myIntent = new Intent(QrActivity.this, DistributionDetails.class);
              myIntent.putExtra("QrActivityViewDetails", detDis);
              startActivity(myIntent);
  
  
          }
  
  
      };
  </code></pre>
  
  <hr>
  
  <p>This is QrActivityViewDetails Class file</p>
  
  <pre><code>public class QrActivityViewDetails implements Serializable {
  
  @SerializedName("DistributionID")
  private int DistributionID;
  
  @SerializedName("full_name")
  private String full_name;
  
  @SerializedName("full_address")
  private String full_address;
  
  @SerializedName("contact")
  private String contact;
  
  
  public QrActivityViewDetails(int DistributionID, String full_name, String full_address, String contact_number)
  {
      this.DistributionID = DistributionID;
      this.full_name = full_name;
      this.full_address = full_address;
      this.contact = contact_number;
  
  
  }
  
  public
  int getRecord_id() {
      return DistributionID;
  }
  
  public
  void setRecord_id(int record_id) {
      this.DistributionID = record_id;
  }
  
  public
  String getFull_name() {
      return full_name;
  }
  
  public
  void setFull_name(String full_name) {
      this.full_name = full_name;
  }
  
  public
  String getFull_address() {
      return full_address;
  }
  
  public
  void setFull_address(String full_address) {
      this.full_address = full_address;
  }
  
  public
  String getContact() {
      return contact;
  }
  
  public
  void setContact(String contact) {
      this.contact = contact;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is View Data  Activity  called DistributionDetails---------------</p>
  
  <p>public class DistributionDetails extends AppCompatActivity  {</p>
  
  <pre><code>private QrActivityViewDetails detQRV;
  
  
  
  TextView ID ,Address ,name,contact;
  Button btnDIR;
  
  
  
  
  
  @Override
  protected
  void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_distribution_details);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
      ID = (TextView) findViewById(R.id.lblID);
      Address = (TextView) findViewById(R.id.lblAddress);
      name = (TextView) findViewById(R.id.lblUname);
      contact = (TextView) findViewById(R.id.lblTelenum);
      btnDIR = (Button) findViewById(R.id.btnDelivered);
  
  
  
      IntendFill();
  
          btnDIR.setOnClickListener(new View.OnClickListener() {
              @Override
              public
              void onClick(View v) {
  
                  Intent intent = new Intent(DistributionDetails.this, FinalActivity.class);
  
                  startActivity(intent);
              }
  
          });
  
  }
  
  
  
  public void IntendFill() {
      Intent intent = getIntent();
      if (intent.hasExtra("QrActivityViewDetails")) {
          detQRV = (QrActivityViewDetails) intent.getSerializableExtra("QrActivityViewDetails");
  
          ID.setText(String.valueOf(detQRV.getRecord_id()));
          Address.setText(String.valueOf(detQRV.getFull_address()));
          name.setText(String.valueOf(detQRV.getFull_name()));
          contact.setText(String.valueOf(detQRV.getContact()));
  
      }
  }
  </code></pre>
  
  <p>}</p>