How to make separate class for volley library and call all method of volley from another activity and get response?

前端 未结 5 1488
不知归路
不知归路 2020-12-01 06:42

how to create a separate class in which define all about volley and in another activity we directly pass URL,CONTEXT and Get Response...

5条回答
  •  悲&欢浪女
    2020-12-01 07:33

    you actually missed one parameter in the above VolleyService class. You needed to include, it is,... JsonObjectRequest jsonObj = new JsonObjectRequest(Request.Method.GET, url,null,new Response.Listener() { /..../ } null is the parameter should be included else it gives error

提交回复
热议问题