1. AC Question's Avatar
    public class Test extends AppCompatActivity
    {
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_test);
    Question question=new Question();
    getQuestionNo("nik",question);
    Toast.makeText(Test.this, question.getQue(), Toast.LENGTH_LONG).show();

    }
    void getQuestionNo(String email, final Question question)
    {
    String urlQueNo = PageConfig.QUIZ_QUESTIONNO + email;
    StringRequest stringRequest = new StringRequest(urlQueNo, new Response.Listener<String>()
    {
    @Override
    public void onResponse(String response)
    {
    question.setQue(response);
    }
    }, new Response.ErrorListener()
    {
    @Override
    public void onErrorResponse(VolleyError error)
    {
    Toast.makeText(Test.this, "error on response1", Toast.LENGTH_LONG).show();

    }
    });
    RequestQueue requestQueue = Volley.newRequestQueue(this);
    requestQueue.add(stringRequest);
    }
    }
    public class Question
    {
    private String que="hi";

    public String getQue()
    {
    return que;
    }

    public void setQue(String que)
    {
    this.que = que;
    }
    }
    01-30-2017 08:35 AM
  2. Golfdriver97's Avatar
    Welcome to the forums. Can you rephrase your question?
    01-30-2017 09:07 AM

Similar Threads

  1. Pixel with Verizon + Message Not Reading Messages on Ford Sync
    By walterwood44 in forum Google Pixel & Pixel XL
    Replies: 1
    Last Post: 01-31-2017, 08:08 AM
  2. Samsung Galaxy S7-How do I print out text messages
    By AC Question in forum Ask a Question
    Replies: 2
    Last Post: 01-30-2017, 07:40 PM
  3. Replies: 1
    Last Post: 01-30-2017, 05:45 PM
  4. Replies: 1
    Last Post: 01-30-2017, 05:41 PM
  5. Replies: 0
    Last Post: 01-30-2017, 04:06 AM
LINK TO POST COPIED TO CLIPBOARD